summaryrefslogtreecommitdiff
path: root/cursor
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2022-05-06 21:57:24 +0200
committerSimon Ser <contact@emersion.fr>2022-05-06 21:57:24 +0200
commit2dcc35af81cfc894335088a3843fc26af7ac9306 (patch)
tree474d53b1bf881a65c630cadbbaffa498e8d51e85 /cursor
parent04efea1727f243ac1d243cee40daad1692fe2f90 (diff)
downloadwayland-2dcc35af81cfc894335088a3843fc26af7ac9306.tar.gz
cursor: use MAP_FAILED instead of hardcoded constant
Signed-off-by: Simon Ser <contact@emersion.fr>
Diffstat (limited to 'cursor')
-rw-r--r--cursor/wayland-cursor.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cursor/wayland-cursor.c b/cursor/wayland-cursor.c
index b3495e0..3501088 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;