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:
parent
9229a45116
commit
c95feefbc0
@ -75,11 +75,9 @@ create_shm_buffer(struct touch *touch)
|
||||
struct wl_shm_pool *pool;
|
||||
int fd, size, stride;
|
||||
void *data;
|
||||
struct buffer *buffer = NULL;
|
||||
struct buffer *buffer;
|
||||
|
||||
buffer = zalloc(sizeof(*buffer));
|
||||
if (!buffer)
|
||||
return NULL;
|
||||
buffer = xzalloc(sizeof(*buffer));
|
||||
|
||||
stride = touch->width * 4;
|
||||
size = stride * touch->height;
|
||||
|
Loading…
Reference in New Issue
Block a user