aboutsummaryrefslogtreecommitdiff
path: root/lib/libc
diff options
context:
space:
mode:
authorPoul-Henning Kamp <phk@FreeBSD.org>1996-01-05 23:30:41 +0000
committerPoul-Henning Kamp <phk@FreeBSD.org>1996-01-05 23:30:41 +0000
commit926cb56114936aee919f37e74b3d7b7aff76aa63 (patch)
tree5251f173a9481c253396374b26fbaf4d3772e5e0 /lib/libc
parent4b29bc4f8a1cdaeb4b812aec1acf3a7c54845554 (diff)
downloadsrc-926cb56114936aee919f37e74b3d7b7aff76aa63.tar.gz
src-926cb56114936aee919f37e74b3d7b7aff76aa63.zip
Fix a fencepost error.
Found by: Lars Fredriksen <fredriks@mcs.com>
Notes
Notes: svn path=/head/; revision=13268
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/stdlib/malloc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/libc/stdlib/malloc.c b/lib/libc/stdlib/malloc.c
index d9067748a73d..429902868c40 100644
--- a/lib/libc/stdlib/malloc.c
+++ b/lib/libc/stdlib/malloc.c
@@ -6,7 +6,7 @@
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
* ----------------------------------------------------------------------------
*
- * $Id: malloc.c,v 1.7 1995/12/11 14:28:12 peter Exp $
+ * $Id: malloc.c,v 1.8 1995/12/18 12:03:54 phk Exp $
*
*/
@@ -362,7 +362,7 @@ malloc_exit()
* Allocate a number of pages from the OS
*/
static caddr_t
-map_pages(int pages, int update)
+map_pages(int pages)
{
caddr_t result,tail;
@@ -379,7 +379,7 @@ map_pages(int pages, int update)
last_index = ptr2index(tail) - 1;
malloc_brk = tail;
- if (update && last_index >= malloc_ninfo && !extend_pgdir(last_index))
+ if ((last_index+1) >= malloc_ninfo && !extend_pgdir(last_index))
return 0;;
return result;
@@ -664,7 +664,7 @@ malloc_pages(size_t size)
/* Map new pages */
if (!p)
- p = map_pages(size,1);
+ p = map_pages(size);
if (p) {