diff options
-rw-r--r-- | src/lib/libc/stdlib/malloc.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/lib/libc/stdlib/malloc.c b/src/lib/libc/stdlib/malloc.c index fc82a4f419..ae88e068ff 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.23 1997/04/05 05:05:44 tholo Exp $"; | 11 | static char rcsid[] = "$OpenBSD: malloc.c,v 1.24 1997/04/30 05:52:50 tholo Exp $"; |
12 | #endif /* LIBC_SCCS and not lint */ | 12 | #endif /* LIBC_SCCS and not lint */ |
13 | 13 | ||
14 | /* | 14 | /* |
@@ -160,7 +160,7 @@ static u_long last_index; | |||
160 | static struct pginfo **page_dir; | 160 | static struct pginfo **page_dir; |
161 | 161 | ||
162 | /* How many slots in the page directory */ | 162 | /* How many slots in the page directory */ |
163 | static unsigned malloc_ninfo; | 163 | static size_t malloc_ninfo; |
164 | 164 | ||
165 | /* Free pages line up here */ | 165 | /* Free pages line up here */ |
166 | static struct pgfree free_list; | 166 | static struct pgfree free_list; |
@@ -275,7 +275,7 @@ malloc_dump(fd) | |||
275 | /* print out various info */ | 275 | /* print out various info */ |
276 | fprintf(fd, "Minsize\t%d\n", malloc_minsize); | 276 | fprintf(fd, "Minsize\t%d\n", malloc_minsize); |
277 | fprintf(fd, "Maxsize\t%d\n", malloc_maxsize); | 277 | fprintf(fd, "Maxsize\t%d\n", malloc_maxsize); |
278 | fprintf(fd, "Pagesize\t%d\n", malloc_pagesize); | 278 | fprintf(fd, "Pagesize\t%lu\n", (u_long)malloc_pagesize); |
279 | fprintf(fd, "Pageshift\t%d\n", malloc_pageshift); | 279 | fprintf(fd, "Pageshift\t%d\n", malloc_pageshift); |
280 | fprintf(fd, "FirstPage\t%ld\n", malloc_origo); | 280 | fprintf(fd, "FirstPage\t%ld\n", malloc_origo); |
281 | fprintf(fd, "LastPage\t%ld %lx\n", last_index+malloc_pageshift, | 281 | fprintf(fd, "LastPage\t%ld %lx\n", last_index+malloc_pageshift, |
@@ -367,8 +367,7 @@ extend_pgdir(index) | |||
367 | u_long index; | 367 | u_long index; |
368 | { | 368 | { |
369 | struct pginfo **new, **old; | 369 | struct pginfo **new, **old; |
370 | int i; | 370 | size_t i, oldlen; |
371 | size_t oldlen; | ||
372 | 371 | ||
373 | /* Make it this many pages */ | 372 | /* Make it this many pages */ |
374 | i = index * sizeof *page_dir; | 373 | i = index * sizeof *page_dir; |
@@ -622,7 +621,7 @@ malloc_make_chunks(bits) | |||
622 | int i, k, l; | 621 | int i, k, l; |
623 | 622 | ||
624 | /* Allocate a new bucket */ | 623 | /* Allocate a new bucket */ |
625 | pp = malloc_pages(malloc_pagesize); | 624 | pp = malloc_pages((size_t)malloc_pagesize); |
626 | if (!pp) | 625 | if (!pp) |
627 | return 0; | 626 | return 0; |
628 | 627 | ||