stefan pushed a commit to branch master.

http://git.enlightenment.org/core/evas_generic_loaders.git/commit/?id=0adc2138606c41cbbdde66c2548b024c1038493c

commit 0adc2138606c41cbbdde66c2548b024c1038493c
Author: Stefan Schmidt <ste...@osg.samsung.com>
Date:   Tue Nov 10 16:20:34 2015 +0100

    raw: pass NULL to mmap() instead 0 for address
    
    Surprising to see this. 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
---
 src/bin/raw/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/bin/raw/main.c b/src/bin/raw/main.c
index bceb9ff..ac9f810 100644
--- a/src/bin/raw/main.c
+++ b/src/bin/raw/main.c
@@ -53,7 +53,7 @@ _raw_init(const char *file)
 
    if (stat(file, &ss)) goto close_file;
    seg_size = ss.st_size;
-   seg = mmap(0, seg_size, PROT_READ, MAP_SHARED, fd, 0);
+   seg = mmap(NULL, seg_size, PROT_READ, MAP_SHARED, fd, 0);
    if (seg == MAP_FAILED) goto close_file;
 
    D("raw_init\n");

-- 


Reply via email to