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/go.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'commands/go.c') diff --git a/commands/go.c b/commands/go.c index fb319b320c..ecc2ceb6e4 100644 --- a/commands/go.c +++ b/commands/go.c @@ -45,7 +45,7 @@ static int do_go(int argc, char *argv[]) } addr = memmap(fd, PROT_READ); - if (addr == (void *)-1) { + if (addr == MAP_FAILED) { perror("memmap"); goto out; } -- cgit v1.2.3