]> Pileus Git - ~andy/git/blobdiff - decorate.c
Merge branch 'rr/complete-difftool-fixup'
[~andy/git] / decorate.c
index e6fd8a7441a7ac6753d93e7156b9f71fe248262d..7cb5d29a89a43ecf7e433db513b66184df3accb8 100644 (file)
@@ -18,7 +18,7 @@ static void *insert_decoration(struct decoration *n, const struct object *base,
 {
        int size = n->size;
        struct object_decoration *hash = n->hash;
-       int j = hash_obj(base, size);
+       unsigned int j = hash_obj(base, size);
 
        while (hash[j].base) {
                if (hash[j].base == base) {
@@ -49,7 +49,7 @@ static void grow_decoration(struct decoration *n)
                const struct object *base = old_hash[i].base;
                void *decoration = old_hash[i].decoration;
 
-               if (!base)
+               if (!decoration)
                        continue;
                insert_decoration(n, base, decoration);
        }
@@ -70,7 +70,7 @@ void *add_decoration(struct decoration *n, const struct object *obj,
 /* Lookup a decoration pointer */
 void *lookup_decoration(struct decoration *n, const struct object *obj)
 {
-       int j;
+       unsigned int j;
 
        /* nothing to lookup */
        if (!n->size)