From d4bab21756279db540866998099522dbd39c05f7 Mon Sep 17 00:00:00 2001 From: Jason Evans Date: Sun, 24 Oct 2010 20:08:37 -0700 Subject: [PATCH] Fix compilation error. Don't declare loop variable inside for (...) clause. --- jemalloc/src/arena.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/jemalloc/src/arena.c b/jemalloc/src/arena.c index 3d4f8888..7f939b3c 100644 --- a/jemalloc/src/arena.c +++ b/jemalloc/src/arena.c @@ -304,8 +304,10 @@ arena_run_reg_dalloc(arena_run_t *run, void *ptr) static inline void arena_chunk_validate_zeroed(arena_chunk_t *chunk, size_t run_ind) { + size_t i; size_t *p = (size_t *)((uintptr_t)chunk + (run_ind << PAGE_SHIFT)); - for (size_t i = 0; i < PAGE_SIZE / sizeof(size_t); i++) + + for (i = 0; i < PAGE_SIZE / sizeof(size_t); i++) assert(p[i] == 0); } #endif