A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
last bunch of codacy treats for tonight. Stop.
[simgrid.git]
/
include
/
xbt
/
str.h
diff --git
a/include/xbt/str.h
b/include/xbt/str.h
index
0f10bef
..
c89cf98
100644
(file)
--- a/
include/xbt/str.h
+++ b/
include/xbt/str.h
@@
-55,11
+55,10
@@
static inline unsigned int xbt_str_hash_ext(const char *str, int str_len)
{
#ifdef XBT_DJB2_HASH_FUNCTION
/* fast implementation of djb2 algorithm */
- int c;
unsigned int hash = 5381;
while (str_len--) {
- c = *str++;
+
int
c = *str++;
hash = ((hash << 5) + hash) + c; /* hash * 33 + c */
}
# elif defined(XBT_FNV_HASH_FUNCTION)