Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
Makes some cleanup/review in gittutorial
[gitweb.git]
/
decorate.c
diff --git
a/decorate.c
b/decorate.c
index 82d9e221eabab53acc418d0db6327e480836a5ed..e6fd8a7441a7ac6753d93e7156b9f71fe248262d 100644
(file)
--- a/
decorate.c
+++ b/
decorate.c
@@
-8,7
+8,9
@@
static unsigned int hash_obj(const 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;
}