summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Schmidt <stefan@osg.samsung.com>2015-11-10 16:20:34 +0100
committerStefan Schmidt <stefan@osg.samsung.com>2015-11-10 16:20:34 +0100
commit0adc2138606c41cbbdde66c2548b024c1038493c (patch)
treed5b083d635662749f54f0ca024d033696dfff011
parentafe27002eeecdd15604d55896dd3b756f042b4aa (diff)
downloadevas_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.c2
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");