summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2003-06-01 09:16:50 +0000
committerphk <phk@FreeBSD.org>2003-06-01 09:16:50 +0000
commit3f94d0804657dbe5bb1c1fe4fa484c0511a73aca (patch)
treeca5de100e61a625aa2720ab1613fe488aff74015 /lib
parentc2bcb3a19efb909e54ef04fcad58988ee3c36803 (diff)
downloadFreeBSD-src-3f94d0804657dbe5bb1c1fe4fa484c0511a73aca.zip
FreeBSD-src-3f94d0804657dbe5bb1c1fe4fa484c0511a73aca.tar.gz
Clarify the code a bit.
Submitted by: Nadav Eiron <nadav@TheEirons.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/stdlib/malloc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libc/stdlib/malloc.c b/lib/libc/stdlib/malloc.c
index 68eccba..778a17e 100644
--- a/lib/libc/stdlib/malloc.c
+++ b/lib/libc/stdlib/malloc.c
@@ -975,11 +975,12 @@ free_pages(void *ptr, u_long index, struct pginfo *info)
malloc_brk = pf->end;
index = ptr2index(pf->end);
- last_index = index - 1;
for(i=index;i <= last_index;)
page_dir[i++] = MALLOC_NOT_MINE;
+ last_index = index - 1;
+
/* XXX: We could realloc/shrink the pagedir here I guess. */
}
if (pt)
OpenPOWER on IntegriCloud