From c95feefbc0fc35954c202b4b1312a566f00fb994 Mon Sep 17 00:00:00 2001 From: Pekka Paalanen Date: Wed, 20 Jul 2022 12:45:04 +0300 Subject: [PATCH] clients/simple-touch: use xzalloc() for buffer This file relied on shared/xalloc.h to include . That would be a problem if xalloc.h stopped doing that. Just use xzalloc(). Signed-off-by: Pekka Paalanen --- clients/simple-touch.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/clients/simple-touch.c b/clients/simple-touch.c index 7c9ada64..6559aa24 100644 --- a/clients/simple-touch.c +++ b/clients/simple-touch.c @@ -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;