X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=decorate.c;h=b2aac90c26296eacdd6c2cdb68a15f3744c595e9;hb=039dc71a7cb824300e242f8abc0fcb19dac93641;hp=7cb5d29a89a43ecf7e433db513b66184df3accb8;hpb=70c87a9854d8ecbeb79e11f8336e0c6247659c8b;p=thirdparty%2Fgit.git diff --git a/decorate.c b/decorate.c index 7cb5d29a89..b2aac90c26 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->sha1) % n; } static void *insert_decoration(struct decoration *n, const struct object *base, void *decoration)