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
Also hash the first char, and please sonar by splitting increment to its own expr
[simgrid.git]
/
teshsuite
/
smpi
/
macro-shared
/
macro-shared.c
diff --git
a/teshsuite/smpi/macro-shared/macro-shared.c
b/teshsuite/smpi/macro-shared/macro-shared.c
index
5c3ee9f
..
d1d9966
100644
(file)
--- a/
teshsuite/smpi/macro-shared/macro-shared.c
+++ b/
teshsuite/smpi/macro-shared/macro-shared.c
@@
-16,10
+16,11
@@
static void* hash(char *str, uint64_t* ans)
char *tohash = str;
*ans=5381;
printf("hashing !\n");
- int c = *
(tohash++)
;
+ int c = *
tohash
;
while (c != 0) {
*ans = ((*ans << 5) + *ans) + c; /* hash * 33 + c */
- c = *(tohash++);
+ tohash++;
+ c = *tohash;
}
return NULL;
}