diff options
author | Jeremy Allison <jra@samba.org> | 2003-09-08 21:33:18 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2003-09-08 21:33:18 +0000 |
commit | e99b77985d790e1b607b914b437c76a558bd0240 (patch) | |
tree | 37c5652e6ce02fb24d8b6a3c0fd12e41a7b46716 | |
parent | 16e6d22408cd00852bc1a796815e77820d0df788 (diff) | |
download | samba-e99b77985d790e1b607b914b437c76a558bd0240.tar.gz samba-e99b77985d790e1b607b914b437c76a558bd0240.tar.bz2 samba-e99b77985d790e1b607b914b437c76a558bd0240.zip |
Don't double-increment p in hash calculation. Found by valgrind.
Jeremy.
(This used to be commit 514d9361c7be8cb8ef1a1309773baab1d982eea6)
-rw-r--r-- | source3/lib/hash.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/lib/hash.c b/source3/lib/hash.c index cd77b0b421..18b6534dec 100644 --- a/source3/lib/hash.c +++ b/source3/lib/hash.c @@ -93,7 +93,7 @@ static int string_hash(int hash_size, const char *key) u32 n = 0; const char *p; for (p = key; *p != '\0'; p++) { - n = ((n << 5) + n) ^ (u32)(*p++); + n = ((n << 5) + n) ^ (u32)(*p); } return (n % hash_size); } |