Use zalloc instead of malloc + memset

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Marek Chalupa <mchqwerty@gmail.com>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
This commit is contained in:
Jonas Ådahl 2015-08-26 12:00:06 +08:00
parent 3de1783e50
commit 2e7fb78682
5 changed files with 15 additions and 18 deletions

View file

@ -29,6 +29,7 @@
#define WAYLAND_PRIVATE_H
#include <stdarg.h>
#include <stdlib.h>
#define WL_HIDE_DEPRECATED 1
@ -216,4 +217,10 @@ struct wl_display;
struct wl_array *
wl_display_get_additional_shm_formats(struct wl_display *display);
static inline void *
zalloc(size_t s)
{
return calloc(1, s);
}
#endif