summaryrefslogtreecommitdiff
path: root/lib/libc
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2001-05-11 15:30:15 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2001-05-11 15:30:15 +0000
commitbc779d87e0b1eb1792440d7f6f530968da5b046d (patch)
treeb679193c3e72c6080fc217471a324169ee57c414 /lib/libc
parent1bb888b82a176a5af07e6ac28d555b1e47433fea (diff)
-1 -> MAP_FAILED
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/db/recno/rec_open.c6
-rw-r--r--lib/libc/nls/catopen.c4
-rw-r--r--lib/libc/stdlib/malloc.c6
3 files changed, 8 insertions, 8 deletions
diff --git a/lib/libc/db/recno/rec_open.c b/lib/libc/db/recno/rec_open.c
index 500e4b41003..af3a0d81dc7 100644
--- a/lib/libc/db/recno/rec_open.c
+++ b/lib/libc/db/recno/rec_open.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rec_open.c,v 1.5 1999/02/15 05:11:25 millert Exp $ */
+/* $OpenBSD: rec_open.c,v 1.6 2001/05/11 15:30:13 art Exp $ */
/*-
* Copyright (c) 1990, 1993, 1994
@@ -40,7 +40,7 @@
#if 0
static char sccsid[] = "@(#)rec_open.c 8.10 (Berkeley) 9/1/94";
#else
-static char rcsid[] = "$OpenBSD: rec_open.c,v 1.5 1999/02/15 05:11:25 millert Exp $";
+static char rcsid[] = "$OpenBSD: rec_open.c,v 1.6 2001/05/11 15:30:13 art Exp $";
#endif
#endif /* LIBC_SCCS and not lint */
@@ -175,7 +175,7 @@ slow: if ((t->bt_rfp = fdopen(rfd, "r")) == NULL)
t->bt_msize = sb.st_size;
if ((t->bt_smap = mmap(NULL, t->bt_msize,
PROT_READ, MAP_PRIVATE, rfd,
- (off_t)0)) == (caddr_t)-1)
+ (off_t)0)) == MAP_FAILED)
goto slow;
t->bt_cmap = t->bt_smap;
t->bt_emap = t->bt_smap + sb.st_size;
diff --git a/lib/libc/nls/catopen.c b/lib/libc/nls/catopen.c
index ffbfda21c17..4b41b44e57a 100644
--- a/lib/libc/nls/catopen.c
+++ b/lib/libc/nls/catopen.c
@@ -35,7 +35,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: catopen.c,v 1.8 1996/09/15 09:31:23 tholo Exp $";
+static char rcsid[] = "$OpenBSD: catopen.c,v 1.9 2001/05/11 15:30:14 art Exp $";
#endif /* LIBC_SCCS and not lint */
#define _NLS_PRIVATE
@@ -145,7 +145,7 @@ load_msgcat(path)
data = mmap(0, (size_t) st.st_size, PROT_READ, MAP_SHARED, fd, (off_t)0);
close (fd);
- if (data == (void *) -1) {
+ if (data == MAP_FAILED) {
munmap(data, (size_t) st.st_size);
return (nl_catd) -1;
}
diff --git a/lib/libc/stdlib/malloc.c b/lib/libc/stdlib/malloc.c
index d9211e2641f..deef086428a 100644
--- a/lib/libc/stdlib/malloc.c
+++ b/lib/libc/stdlib/malloc.c
@@ -8,7 +8,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: malloc.c,v 1.41 2001/05/10 16:14:19 art Exp $";
+static char rcsid[] = "$OpenBSD: malloc.c,v 1.42 2001/05/11 15:30:14 art Exp $";
#endif /* LIBC_SCCS and not lint */
/*
@@ -485,7 +485,7 @@ extend_pgdir(index)
/* Get new pages */
new = (struct pginfo**) MMAP(i * malloc_pagesize);
- if (new == (struct pginfo **)-1)
+ if (new == MAP_FAILED)
return 0;
/* Copy the old stuff */
@@ -592,7 +592,7 @@ malloc_init ()
/* Allocate one page for the page directory */
page_dir = (struct pginfo **) MMAP(malloc_pagesize);
- if (page_dir == (struct pginfo **) -1)
+ if (page_dir == MAP_FAILED)
wrterror("mmap(2) failed, check limits.\n");
/*