[PATCH 1/2] nedmalloc: fix misleading indentation
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Aug 4, 2016, 16:07 UTC
- Message-ID
- <0e17a706c29932e2280a1bc1730f5064bbcfec57.1470326812.git.johannes.schindelin@gmx.de>
- In-Reply-To
- <cover.1470326812.git.johannes.schindelin@gmx.de>
Some code in nedmalloc is indented in a funny way that could be misinterpreted as if a line after a for loop was included in the loop body, when it is not.
GCC 6 complains about this in DEVELOPER=YepSure mode.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> --- compat/nedmalloc/nedmalloc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/compat/nedmalloc/nedmalloc.c b/compat/nedmalloc/nedmalloc.c index a0a16eb..677d1b2 100644 --- a/compat/nedmalloc/nedmalloc.c +++ b/compat/nedmalloc/nedmalloc.c @@ -938,10 +938,10 @@ void **nedpindependent_comalloc(nedpool *p, size_t elems, size_t *sizes, void ** void **ret; threadcache *tc; int mymspace; - size_t i, *adjustedsizes=(size_t *) alloca(elems*sizeof(size_t)); - if(!adjustedsizes) return 0; - for(i=0; i<elems; i++) - adjustedsizes[i]=sizes[i]<sizeof(threadcacheblk) ? sizeof(threadcacheblk) : sizes[i]; + size_t i, *adjustedsizes=(size_t *) alloca(elems*sizeof(size_t)); + if(!adjustedsizes) return 0; + for(i=0; i<elems; i++) + adjustedsizes[i]=sizes[i]<sizeof(threadcacheblk) ? sizeof(threadcacheblk) : sizes[i]; GetThreadCache(&p, &tc, &mymspace, 0); GETMSPACE(m, p, tc, mymspace, 0, ret=mspace_independent_comalloc(m, elems, adjustedsizes, chunks));
-- 2.9.0.281.g286a8d9