diff options
Diffstat (limited to 'decorate.c')
-rw-r--r-- | decorate.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/decorate.c b/decorate.c index 2f8a63e388..270eb25197 100644 --- a/decorate.c +++ b/decorate.c @@ -8,10 +8,7 @@ static unsigned int hash_obj(const struct object *obj, unsigned int n) { - unsigned int hash; - - memcpy(&hash, obj->sha1, sizeof(unsigned int)); - return hash % n; + return sha1hash(obj->oid.hash) % n; } static void *insert_decoration(struct decoration *n, const struct object *base, void *decoration) @@ -49,7 +46,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); } |