-/* $OpenBSD: malloc.c,v 1.244 2018/01/30 17:46:41 otto Exp $ */
+/* $OpenBSD: malloc.c,v 1.245 2018/02/07 18:58:30 otto Exp $ */
/*
* Copyright (c) 2008, 2010, 2011, 2016 Otto Moerbeek <otto@drijf.net>
* Copyright (c) 2012 Matthew Dempsky <matthew@openbsd.org>
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;
break;
}
}
- i++;
}
}
for (i = 0; ; i++) {