From 246216c24eb60d2742aec18fa875c40a905ed223 Mon Sep 17 00:00:00 2001 From: Andrey Smirnov Date: Sat, 12 Jan 2019 00:24:51 -0800 Subject: treewide: Introduce MAP_FAILED and replace ad-hoc constants with it Signed-off-by: Andrey Smirnov Signed-off-by: Sascha Hauer --- commands/md.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'commands/md.c') diff --git a/commands/md.c b/commands/md.c index 3e83c723a3..a495fc8b41 100644 --- a/commands/md.c +++ b/commands/md.c @@ -68,7 +68,7 @@ static int do_mem_md(int argc, char *argv[]) return 1; map = memmap(fd, PROT_READ); - if (map != (void *)-1) { + if (map != MAP_FAILED) { ret = memory_display(map + start, start, size, mode >> O_RWSIZE_SHIFT, swab); goto out; -- cgit v1.2.3