summaryrefslogtreecommitdiff
path: root/lib/libc
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2000-10-12 12:47:59 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2000-10-12 12:47:59 +0000
commite9a7305ed6de6bc9a07daa70898f5bba08ef4d31 (patch)
treeac13eb2cd36b3cfe9734e5fd43ebc2e1384a387e /lib/libc
parent7842f6e8b0966696b1b11462dd46eb245c813bd4 (diff)
MAP_FAILED, not -1.
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/gen/nlist.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libc/gen/nlist.c b/lib/libc/gen/nlist.c
index 35b790140da..2674efa7040 100644
--- a/lib/libc/gen/nlist.c
+++ b/lib/libc/gen/nlist.c
@@ -32,7 +32,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: nlist.c,v 1.33 1999/08/17 09:13:12 millert Exp $";
+static char rcsid[] = "$OpenBSD: nlist.c,v 1.34 2000/10/12 12:47:58 art Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
@@ -337,7 +337,7 @@ __elf_fdnlist(fd, list)
/* mmap section header table */
shdr = (Elf32_Shdr *)mmap(NULL, (size_t)shdr_size, PROT_READ,
MAP_COPY|MAP_FILE, fd, (off_t) ehdr.e_shoff);
- if (shdr == (Elf32_Shdr *)-1)
+ if (shdr == MAP_FAILED)
return (-1);
/*
@@ -373,7 +373,7 @@ __elf_fdnlist(fd, list)
*/
strtab = mmap(NULL, (size_t)symstrsize, PROT_READ, MAP_COPY|MAP_FILE,
fd, (off_t) symstroff);
- if (strtab == (char *)-1)
+ if (strtab == MAP_FAILED)
return (-1);
/*
* clean out any left-over information for all valid entries.