Browse Source

-1 -> MAP_FAILED

OPENBSD_3_0
art 23 years ago
parent
commit
4a1143fa05
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      src/lib/libc/stdlib/malloc.c

+ 3
- 3
src/lib/libc/stdlib/malloc.c View File

@ -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");
/*


Loading…
Cancel
Save