From 4a1143fa05ecadc9b72377e7fa8a26f9f7b392b7 Mon Sep 17 00:00:00 2001 From: art <> Date: Fri, 11 May 2001 15:30:14 +0000 Subject: [PATCH] -1 -> MAP_FAILED --- src/lib/libc/stdlib/malloc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/libc/stdlib/malloc.c b/src/lib/libc/stdlib/malloc.c index d9211e26..deef0864 100644 --- a/src/lib/libc/stdlib/malloc.c +++ b/src/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"); /*