From e99b77985d790e1b607b914b437c76a558bd0240 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 8 Sep 2003 21:33:18 +0000 Subject: Don't double-increment p in hash calculation. Found by valgrind. Jeremy. (This used to be commit 514d9361c7be8cb8ef1a1309773baab1d982eea6) --- source3/lib/hash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/lib') 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); } -- cgit