malloc + memset -> zalloc
And for clients using the xmalloc helper, use xzalloc.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
diff --git a/clients/dnd.c b/clients/dnd.c
index ff46fd7..cfdf92f 100644
--- a/clients/dnd.c
+++ b/clients/dnd.c
@@ -567,9 +567,7 @@
int32_t width, height;
unsigned int i;
- dnd = xmalloc(sizeof *dnd);
- memset(dnd, 0, sizeof *dnd);
-
+ dnd = xzalloc(sizeof *dnd);
dnd->window = window_create(display);
dnd->widget = frame_create(dnd->window, dnd);
window_set_title(dnd->window, "Wayland Drag and Drop Demo");