summaryrefslogtreecommitdiff
path: root/src/oidmap.h
diff options
context:
space:
mode:
authorVicent Marti <tanoku@gmail.com>2013-04-01 19:38:23 +0200
committerVicent Marti <tanoku@gmail.com>2013-04-22 16:50:50 +0200
commit5df184241a6cfe88ac5ebcee9a3ad175abfca0cd (patch)
tree36136d01b6016204b5ee9b08a4efe93bf6813613 /src/oidmap.h
parenta92dd316079250b27cc933b1fd00cd6af88b88d9 (diff)
downloadlibgit2-5df184241a6cfe88ac5ebcee9a3ad175abfca0cd.tar.gz
lol this worked first try wtf
Diffstat (limited to 'src/oidmap.h')
-rw-r--r--src/oidmap.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/oidmap.h b/src/oidmap.h
index 40274cd19..dfa951af3 100644
--- a/src/oidmap.h
+++ b/src/oidmap.h
@@ -21,10 +21,8 @@ typedef khash_t(oid) git_oidmap;
GIT_INLINE(khint_t) hash_git_oid(const git_oid *oid)
{
- int i;
- khint_t h = 0;
- for (i = 0; i < 20; ++i)
- h = (h << 5) - h + oid->id[i];
+ khint_t h;
+ memcpy(&h, oid, sizeof(khint_t));
return h;
}