clients/simple-touch: use xzalloc() for buffer
This file relied on shared/xalloc.h to include <libweston/zalloc.h>. That would be a problem if xalloc.h stopped doing that. Just use xzalloc(). Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
This commit is contained in:
@@ -75,11 +75,9 @@ create_shm_buffer(struct touch *touch)
|
|||||||
struct wl_shm_pool *pool;
|
struct wl_shm_pool *pool;
|
||||||
int fd, size, stride;
|
int fd, size, stride;
|
||||||
void *data;
|
void *data;
|
||||||
struct buffer *buffer = NULL;
|
struct buffer *buffer;
|
||||||
|
|
||||||
buffer = zalloc(sizeof(*buffer));
|
buffer = xzalloc(sizeof(*buffer));
|
||||||
if (!buffer)
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
stride = touch->width * 4;
|
stride = touch->width * 4;
|
||||||
size = stride * touch->height;
|
size = stride * touch->height;
|
||||||
|
|||||||
Reference in New Issue
Block a user