submodule foreach: fix "<command> --quiet" not being respected
[gitweb.git] / builtin / pack-redundant.c
index cf9a9aabd4eb2e834c08f85240bcb3d0154c3320..11bc51456631e65a35f11d7b5118dc33c0f324e9 100644 (file)
@@ -166,7 +166,7 @@ static inline struct llist_item * llist_sorted_remove(struct llist *list, const
        l = (hint == NULL) ? list->front : hint;
        prev = NULL;
        while (l) {
-               int cmp = oidcmp(l->oid, oid);
+               const int cmp = oidcmp(l->oid, oid);
                if (cmp > 0) /* not in list, since sorted */
                        return prev;
                if (!cmp) { /* found */
@@ -264,7 +264,7 @@ static void cmp_two_packs(struct pack_list *p1, struct pack_list *p2)
        while (p1_off < p1->pack->num_objects * p1_step &&
               p2_off < p2->pack->num_objects * p2_step)
        {
-               int cmp = hashcmp(p1_base + p1_off, p2_base + p2_off);
+               const int cmp = hashcmp(p1_base + p1_off, p2_base + p2_off);
                /* cmp ~ p1 - p2 */
                if (cmp == 0) {
                        p1_hint = llist_sorted_remove(p1->unique_objects,