cursor: use MAP_FAILED instead of hardcoded constant

Signed-off-by: Simon Ser <contact@emersion.fr>
This commit is contained in:
Simon Ser 2022-05-06 21:57:24 +02:00
parent 04efea1727
commit 2dcc35af81

View File

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