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>
dev
Pekka Paalanen 2 years ago
parent 9229a45116
commit c95feefbc0
  1. 6
      clients/simple-touch.c

@ -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;

Loading…
Cancel
Save