diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1998-01-02 05:32:53 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1998-01-02 05:32:53 +0000 |
commit | 3984dde12bd1be44d28ce9358d0be17ea7965828 (patch) | |
tree | bb8a7e96ead4c07a3eafac66aa59a406a7ca65ab /lib/libc/stdlib/malloc.c | |
parent | 0984b7e48fbd310e0b7e81940f3ac052563aaaab (diff) |
make mmap() return void *, add MAP_FAILED
Diffstat (limited to 'lib/libc/stdlib/malloc.c')
-rw-r--r-- | lib/libc/stdlib/malloc.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/libc/stdlib/malloc.c b/lib/libc/stdlib/malloc.c index 66d1a2a9daf..9aadc494f90 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.29 1997/08/23 10:43:25 pefo Exp $"; +static char rcsid[] = "$OpenBSD: malloc.c,v 1.30 1998/01/02 05:32:49 deraadt Exp $"; #endif /* LIBC_SCCS and not lint */ /* @@ -268,7 +268,7 @@ static char *malloc_func; /* Macro for mmap */ #define MMAP(size) \ - mmap((caddr_t)0, (size), PROT_READ|PROT_WRITE, MAP_ANON|MAP_PRIVATE, \ + mmap((void *)0, (size), PROT_READ|PROT_WRITE, MAP_ANON|MAP_PRIVATE, \ MMAP_FD, (off_t)0); /* @@ -391,7 +391,7 @@ malloc_exit() /* * Allocate a number of pages from the OS */ -static caddr_t +static void * map_pages(pages) int pages; { @@ -466,7 +466,7 @@ extend_pgdir(index) page_dir = new; /* Now free the old stuff */ - munmap((caddr_t)old, oldlen); + munmap(old, oldlen); return 1; } |