Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
commit: Fix a memory leak in determine_author_info
[gitweb.git]
/
name-hash.c
diff --git
a/name-hash.c
b/name-hash.c
index 91241336f827090848a019990253e20725ff62cb..6d7e1980c62f96fc3614ddd130ce25a765fceae5 100644
(file)
--- a/
name-hash.c
+++ b/
name-hash.c
@@
-24,11
+24,11
@@
static unsigned int hash_name(const char *name, int namelen)
{
unsigned int hash = 0x123;
-
do
{
+
while (namelen--)
{
unsigned char c = *name++;
c = icase_hash(c);
hash = hash*101 + c;
- }
while (--namelen);
+ }
return hash;
}