summaryrefslogtreecommitdiff
path: root/clients/presentation-shm.c
diff options
context:
space:
mode:
authorBryce Harrington <bryce@osg.samsung.com>2016-02-11 16:42:49 -0800
committerBryce Harrington <bryce@osg.samsung.com>2016-03-09 22:54:54 -0800
commit0d1a6223751242387f1fe62c8da508d6035d7fbd (patch)
tree2b0aa6fbd816b21b1de78595300da67dfe09a614 /clients/presentation-shm.c
parentcd9424ef2a8face5d64b086bc55ab4e70e077beb (diff)
downloadweston-0d1a6223751242387f1fe62c8da508d6035d7fbd.tar.gz
clients: Use zalloc
Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Diffstat (limited to 'clients/presentation-shm.c')
-rw-r--r--clients/presentation-shm.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/clients/presentation-shm.c b/clients/presentation-shm.c
index 1feeb365..2d9b8852 100644
--- a/clients/presentation-shm.c
+++ b/clients/presentation-shm.c
@@ -37,6 +37,7 @@
#include <wayland-client.h>
#include "shared/helpers.h"
+#include "shared/zalloc.h"
#include "shared/os-compatibility.h"
#include "presentation-time-client-protocol.h"
@@ -212,7 +213,7 @@ create_window(struct display *display, int width, int height,
"presentation-shm: %s [Delay %i msecs]", run_mode_name[mode],
commit_delay_msecs);
- window = calloc(1, sizeof *window);
+ window = zalloc(sizeof *window);
if (!window)
return NULL;
@@ -500,7 +501,7 @@ window_create_feedback(struct window *window, uint32_t frame_stamp)
if (!pres)
return;
- feedback = calloc(1, sizeof *feedback);
+ feedback = zalloc(sizeof *feedback);
if (!feedback)
return;
@@ -678,7 +679,7 @@ display_add_output(struct display *d, uint32_t name, uint32_t version)
{
struct output *o;
- o = calloc(1, sizeof(*o));
+ o = zalloc(sizeof(*o));
assert(o);
o->output = wl_registry_bind(d->registry, name,