From 2b5a45926ba632471019e2784d01cc24f42b0746 Mon Sep 17 00:00:00 2001 From: otto Date: Wed, 7 Feb 2018 18:59:20 +0000 Subject: [PATCH] sync with libc malloc: use consistent style for for loop in unmap(), no functional change --- libexec/ld.so/malloc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libexec/ld.so/malloc.c b/libexec/ld.so/malloc.c index 7a58c6c440d..8b59c3aea28 100644 --- a/libexec/ld.so/malloc.c +++ b/libexec/ld.so/malloc.c @@ -416,8 +416,7 @@ unmap(struct dir_info *d, void *p, size_t sz, int junk) mask = mopts.malloc_cache - 1; if (psz > rsz) { size_t tounmap = psz - rsz; - i = 0; - for (;;) { + for (i = 0; ; i++) { r = &d->free_regions[(i + offset) & mask]; if (r->p != NULL) { rsz = r->size << MALLOC_PAGESHIFT; @@ -434,7 +433,6 @@ unmap(struct dir_info *d, void *p, size_t sz, int junk) break; } } - i++; } } for (i = 0; ; i++) { -- 2.20.1