diff options
author | Ryo Munakata <ryomnktml@gmail.com> | 2015-08-07 20:20:46 +0900 |
---|---|---|
committer | Bryce Harrington <bryce@osg.samsung.com> | 2015-08-07 11:59:10 -0700 |
commit | 5e653caa4a45a313a968a6a52437c0c382dc8b34 (patch) | |
tree | dd1cf19d267da1fa3d1f738b37e0622ba04e9b2f /clients/subsurfaces.c | |
parent | b18f788e2e7476840eac54b0e7ac30a0244e4528 (diff) | |
download | weston-5e653caa4a45a313a968a6a52437c0c382dc8b34.tar.gz |
Use [x]zalloc instead of [x]malloc + memset
Signed-off-by: Ryo Munakata <ryomnktml@gmail.com>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
Diffstat (limited to 'clients/subsurfaces.c')
-rw-r--r-- | clients/subsurfaces.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/clients/subsurfaces.c b/clients/subsurfaces.c index 32179db0..b971fdff 100644 --- a/clients/subsurfaces.c +++ b/clients/subsurfaces.c @@ -498,8 +498,7 @@ triangle_create(struct window *window, struct egl_state *egl) { struct triangle *tri; - tri = xmalloc(sizeof *tri); - memset(tri, 0, sizeof *tri); + tri = xzalloc(sizeof *tri); tri->egl = egl; tri->widget = window_add_subsurface(window, tri, @@ -720,8 +719,7 @@ demoapp_create(struct display *display) { struct demoapp *app; - app = xmalloc(sizeof *app); - memset(app, 0, sizeof *app); + app = xzalloc(sizeof *app); app->egl = egl_state_create(display_get_display(display)); |