|
From: Petri H. <phi...@us...> - 2018-01-24 20:18:19
|
# HG changeset patch
# User Petri Hintukainen <phi...@us...>
# Date 1516825081 -7200
# Node ID 7c41cf7ad03bfcd510104ef995ab0f64b51e3c7b
# Branch default
# Parent b7cfa1c387ebf7cd508ed6e8acf4efe42b802a45
video_out_fb: use MAP_FAILED
diff --git a/src/video_out/video_out_fb.c b/src/video_out/video_out_fb.c
--- a/src/video_out/video_out_fb.c
+++ b/src/video_out/video_out_fb.c
@@ -685,7 +685,7 @@
{
fb_driver_t *this = (fb_driver_t *)this_gen;
- if (this->video_mem_base != (void *)-1)
+ if (this->video_mem_base != MAP_FAILED)
munmap(this->video_mem_base, this->mem_size);
if (this->fd >= 0)
@@ -987,7 +987,7 @@
if(!this)
return NULL;
- this->video_mem_base = (void*)-1;
+ this->video_mem_base = MAP_FAILED;
_x_alphablend_init(&this->alphablend_extra_data, class->xine);
@@ -1054,7 +1054,7 @@
this->mem_size = this->fb_fix.smem_len;
this->video_mem_base = mmap(0, this->mem_size, PROT_READ | PROT_WRITE,
MAP_SHARED, this->fd, 0);
- if (this->video_mem_base == (void*)-1)
+ if (this->video_mem_base == MAP_FAILED)
goto error;
return &this->vo_driver;
|