]> granicus.if.org Git - git/commitdiff
nedmalloc: fix misleading indentation
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Thu, 4 Aug 2016 16:07:03 +0000 (18:07 +0200)
committerJunio C Hamano <gitster@pobox.com>
Thu, 4 Aug 2016 17:42:05 +0000 (10:42 -0700)
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>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
compat/nedmalloc/nedmalloc.c

index a0a16eb1bbfb22c13f29c15d2fd68ccc9c7e01ad..677d1b2794321c7bd31bb5ba15c4bf8f2d06759e 100644 (file)
@@ -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));