mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2026-04-02 07:15:53 -04:00
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:
parent
3de1783e50
commit
2e7fb78682
5 changed files with 15 additions and 18 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue