artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c8c7c5c
)
sync with libc malloc: use consistent style for for loop in unmap(),
author
otto
<otto@openbsd.org>
Wed, 7 Feb 2018 18:59:20 +0000
(18:59 +0000)
committer
otto
<otto@openbsd.org>
Wed, 7 Feb 2018 18:59:20 +0000
(18:59 +0000)
no functional change
libexec/ld.so/malloc.c
patch
|
blob
|
history
diff --git
a/libexec/ld.so/malloc.c
b/libexec/ld.so/malloc.c
index
7a58c6c
..
8b59c3a
100644
(file)
--- 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++) {