stefan pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=8d19716865625be6f9bc16465c56c0a8458a651d

commit 8d19716865625be6f9bc16465c56c0a8458a651d
Author: Stefan Schmidt <ste...@osg.samsung.com>
Date:   Tue Nov 10 16:31:36 2015 +0100

    ecore_drm: pass NULL to mmap() instead 0 for address
    
    The second find of these. The other one was in evas generic loaders.
    mmap() expects a void * as address here. If we want to let the kernel
    choose the address we should really pass in NULL instead of the
    integer 0.
    
    Thanks goes to the sparse semantic parser for pointing this out.
---
 src/lib/ecore_drm/ecore_drm_fb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/ecore_drm/ecore_drm_fb.c b/src/lib/ecore_drm/ecore_drm_fb.c
index 385d3ea..00c062a 100644
--- a/src/lib/ecore_drm/ecore_drm_fb.c
+++ b/src/lib/ecore_drm/ecore_drm_fb.c
@@ -99,7 +99,7 @@ ecore_drm_fb_create(Ecore_Drm_Device *dev, int width, int 
height)
      }
 
    fb->mmap =
-     mmap(0, fb->size, PROT_WRITE, MAP_SHARED, dev->drm.fd, marg.offset);
+     mmap(NULL, fb->size, PROT_WRITE, MAP_SHARED, dev->drm.fd, marg.offset);
    if (fb->mmap == MAP_FAILED)
      {
         ERR("Could not mmap framebuffer space: %m");

-- 


Reply via email to