git-daemon: rewrite kindergarden, new option --max-connections
[gitweb.git] / decorate.c
index 396b41311a0d1549897d4b92bccd12001d13bc01..d9668d2ef94c73e4a7a5602011ff13a9fd9d8c6a 100644 (file)
@@ -24,7 +24,6 @@ static void *insert_decoration(struct decoration *n, struct object *base, void *
                        hash[j].decoration = decoration;
                        return old;
                }
-               j++;
                if (++j >= size)
                        j = 0;
        }
@@ -38,10 +37,7 @@ static void grow_decoration(struct decoration *n)
 {
        int i;
        int old_size = n->size;
-       struct object_decoration *old_hash;
-
-       old_size = n->size;
-       old_hash = n->hash;
+       struct object_decoration *old_hash = n->hash;
 
        n->size = (old_size + 1000) * 3 / 2;
        n->hash = xcalloc(n->size, sizeof(struct object_decoration));