summaryrefslogtreecommitdiffstats
path: root/common/ratp
diff options
context:
space:
mode:
authorAndrey Smirnov <andrew.smirnov@gmail.com>2019-01-12 00:24:51 -0800
committerSascha Hauer <s.hauer@pengutronix.de>2019-01-16 08:33:34 +0100
commit246216c24eb60d2742aec18fa875c40a905ed223 (patch)
treee51c56d9df1254b565720b2214b6697716d5033a /common/ratp
parent31551c89701c42f63d3f4352ed84e7842d0ba9fe (diff)
downloadbarebox-246216c24eb60d2742aec18fa875c40a905ed223.tar.gz
barebox-246216c24eb60d2742aec18fa875c40a905ed223.tar.xz
treewide: Introduce MAP_FAILED and replace ad-hoc constants with it
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'common/ratp')
-rw-r--r--common/ratp/md.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/ratp/md.c b/common/ratp/md.c
index 9ce7e99dfd..ce343d7c7b 100644
--- a/common/ratp/md.c
+++ b/common/ratp/md.c
@@ -76,7 +76,7 @@ static int do_ratp_mem_md(const char *filename,
return -errno;
map = memmap(fd, PROT_READ);
- if (map != (void *)-1) {
+ if (map != MAP_FAILED) {
memcpy(output, (uint8_t *)(map + start), size);
goto out;
}