summaryrefslogtreecommitdiff
path: root/object.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-05-16 23:08:49 -0700
committerJunio C Hamano <gitster@pobox.com>2009-05-16 23:08:49 -0700
commit55524fcf9d6676ca3840227092bf3a14ba404615 (patch)
tree82e8251a255c5f962f1d5dce75fd14c97cbc3ba9 /object.c
parent671d1bc6a098d1015fbdd6e085d6daf12c1dce15 (diff)
parent076c32370d8a6ac2fb57b2a55c674942e106f8ab (diff)
downloadgit-55524fcf9d6676ca3840227092bf3a14ba404615.tar.gz
Merge branch 'maint'
* maint: completion: add missing options to show-branch and show dir.c: clean up handling of 'path' parameter in read_directory_recursive() Fix type-punning issues
Diffstat (limited to 'object.c')
-rw-r--r--object.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/object.c b/object.c
index 7e6a92c88e..e1feef9c33 100644
--- a/object.c
+++ b/object.c
@@ -45,7 +45,8 @@ int type_from_string(const char *str)
static unsigned int hash_obj(struct object *obj, unsigned int n)
{
- unsigned int hash = *(unsigned int *)obj->sha1;
+ unsigned int hash;
+ memcpy(&hash, obj->sha1, sizeof(unsigned int));
return hash % n;
}