diff options
author | Stefan Schmidt <stefan@osg.samsung.com> | 2015-11-10 16:20:34 +0100 |
---|---|---|
committer | Stefan Schmidt <stefan@osg.samsung.com> | 2015-11-10 16:20:34 +0100 |
commit | 0adc2138606c41cbbdde66c2548b024c1038493c (patch) | |
tree | d5b083d635662749f54f0ca024d033696dfff011 | |
parent | afe27002eeecdd15604d55896dd3b756f042b4aa (diff) | |
download | evas_generic_loaders-0adc2138606c41cbbdde66c2548b024c1038493c.tar.gz |
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
-rw-r--r-- | src/bin/raw/main.c | 2 |
1 files changed, 1 insertions, 1 deletions
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"); |