diff options
author | art <> | 2001-05-11 15:30:14 +0000 |
---|---|---|
committer | art <> | 2001-05-11 15:30:14 +0000 |
commit | 8a08da6ca74511062a42107931dccd8893ae4c00 (patch) | |
tree | 4341ae3d95339039c5d2b01b7aef8432fdbe453a /src | |
parent | 9c17c0eb59532e3bd7e374d9382cf7b3c0b78c68 (diff) | |
download | openbsd-8a08da6ca74511062a42107931dccd8893ae4c00.tar.gz openbsd-8a08da6ca74511062a42107931dccd8893ae4c00.tar.bz2 openbsd-8a08da6ca74511062a42107931dccd8893ae4c00.zip |
-1 -> MAP_FAILED
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libc/stdlib/malloc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/libc/stdlib/malloc.c b/src/lib/libc/stdlib/malloc.c index d9211e2641..deef086428 100644 --- a/src/lib/libc/stdlib/malloc.c +++ b/src/lib/libc/stdlib/malloc.c | |||
@@ -8,7 +8,7 @@ | |||
8 | */ | 8 | */ |
9 | 9 | ||
10 | #if defined(LIBC_SCCS) && !defined(lint) | 10 | #if defined(LIBC_SCCS) && !defined(lint) |
11 | static char rcsid[] = "$OpenBSD: malloc.c,v 1.41 2001/05/10 16:14:19 art Exp $"; | 11 | static char rcsid[] = "$OpenBSD: malloc.c,v 1.42 2001/05/11 15:30:14 art Exp $"; |
12 | #endif /* LIBC_SCCS and not lint */ | 12 | #endif /* LIBC_SCCS and not lint */ |
13 | 13 | ||
14 | /* | 14 | /* |
@@ -485,7 +485,7 @@ extend_pgdir(index) | |||
485 | 485 | ||
486 | /* Get new pages */ | 486 | /* Get new pages */ |
487 | new = (struct pginfo**) MMAP(i * malloc_pagesize); | 487 | new = (struct pginfo**) MMAP(i * malloc_pagesize); |
488 | if (new == (struct pginfo **)-1) | 488 | if (new == MAP_FAILED) |
489 | return 0; | 489 | return 0; |
490 | 490 | ||
491 | /* Copy the old stuff */ | 491 | /* Copy the old stuff */ |
@@ -592,7 +592,7 @@ malloc_init () | |||
592 | /* Allocate one page for the page directory */ | 592 | /* Allocate one page for the page directory */ |
593 | page_dir = (struct pginfo **) MMAP(malloc_pagesize); | 593 | page_dir = (struct pginfo **) MMAP(malloc_pagesize); |
594 | 594 | ||
595 | if (page_dir == (struct pginfo **) -1) | 595 | if (page_dir == MAP_FAILED) |
596 | wrterror("mmap(2) failed, check limits.\n"); | 596 | wrterror("mmap(2) failed, check limits.\n"); |
597 | 597 | ||
598 | /* | 598 | /* |