[PATCH weston 2/3] eventdemo: use zalloc
Pekka Paalanen
ppaalanen at gmail.com
Tue May 10 14:11:40 UTC 2016
From: Pekka Paalanen <pekka.paalanen at collabora.co.uk>
Zero-initialize the struct, just in case.
Signed-off-by: Pekka Paalanen <pekka.paalanen at collabora.co.uk>
---
clients/eventdemo.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/clients/eventdemo.c b/clients/eventdemo.c
index f1558d2..38eb904 100644
--- a/clients/eventdemo.c
+++ b/clients/eventdemo.c
@@ -373,7 +373,7 @@ eventdemo_create(struct display *d)
{
struct eventdemo *e;
- e = malloc(sizeof (struct eventdemo));
+ e = zalloc(sizeof (struct eventdemo));
if (e == NULL)
return NULL;
--
2.7.3
More information about the wayland-devel
mailing list