eventdemo: use zalloc

Zero-initialize the struct, just in case.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
Tested-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Benoit Gschwind <gschwind@gnu-log.net>
Tested-by: Benoit Gschwind <gschwind@gnu-log.net>
dev
Pekka Paalanen 9 years ago
parent 43864990a2
commit 10e92db1d3
  1. 2
      clients/eventdemo.c

@ -373,7 +373,7 @@ eventdemo_create(struct display *d)
{ {
struct eventdemo *e; struct eventdemo *e;
e = malloc(sizeof (struct eventdemo)); e = zalloc(sizeof (struct eventdemo));
if (e == NULL) if (e == NULL)
return NULL; return NULL;

Loading…
Cancel
Save