From 2dcc35af81cfc894335088a3843fc26af7ac9306 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Fri, 6 May 2022 21:57:24 +0200 Subject: [PATCH] cursor: use MAP_FAILED instead of hardcoded constant Signed-off-by: Simon Ser --- cursor/wayland-cursor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cursor/wayland-cursor.c b/cursor/wayland-cursor.c index b3495e0c..3501088a 100644 --- a/cursor/wayland-cursor.c +++ b/cursor/wayland-cursor.c @@ -92,7 +92,7 @@ shm_pool_resize(struct shm_pool *pool, int size) pool->data = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, pool->fd, 0); - if (pool->data == (void *)-1) + if (pool->data == MAP_FAILED) return 0; pool->size = size;