malloc + memset -> zalloc

And for clients using the xmalloc helper, use xzalloc.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer
2013-08-08 11:57:05 +10:00
committed by Kristian Høgsberg
parent b1bc4a68b0
commit f3d62276d2
35 changed files with 68 additions and 138 deletions
+1 -2
View File
@@ -232,11 +232,10 @@ module_init(struct weston_compositor *ec,
struct weston_test *test;
struct wl_event_loop *loop;
test = malloc(sizeof *test);
test = zalloc(sizeof *test);
if (test == NULL)
return -1;
memset(test, 0, sizeof *test);
test->compositor = ec;
weston_layer_init(&test->layer, &ec->cursor_layer.link);