summaryrefslogtreecommitdiff
path: root/xrestop.c
diff options
context:
space:
mode:
Diffstat (limited to 'xrestop.c')
-rw-r--r--xrestop.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/xrestop.c b/xrestop.c
index e08ff07..c3e2d3a 100644
--- a/xrestop.c
+++ b/xrestop.c
@@ -260,8 +260,7 @@ xrestop_client_new(XResTopApp *app)
{
XResTopClient *client = NULL;
- client = malloc(sizeof(XResTopClient));
- memset(client, 0, sizeof(XResTopClient));
+ client = calloc(1,sizeof(XResTopClient));
client->pid = -1;
@@ -643,8 +642,7 @@ main(int argc, char **argv)
int i, event, error, major, minor;
XResTopApp *app = NULL;
- app = malloc(sizeof(XResTopApp));
- memset(app, 0, sizeof(XResTopApp));
+ app = calloc(1,sizeof(XResTopApp));
app->delay = 2;