Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Hide xbt_cfg cruft from smpi tesh files.
[simgrid.git] / teshsuite / smpi / macro-shared / macro-shared.c
index a9f1e5642f69281154971c5d613ae4b3c9ba7869..d1d9966e826d3992a776ef4658b436a8037d7bf6 100644 (file)
@@ -15,12 +15,12 @@ static void* hash(char *str, uint64_t* ans)
 {
   char *tohash = str;
   *ans=5381;
-  int c;
   printf("hashing !\n");
-  c = *tohash++;
-  while (c!=0){
+  int c = *tohash;
+  while (c != 0) {
     *ans = ((*ans << 5) + *ans) + c; /* hash * 33 + c */
-    c = *tohash++;
+    tohash++;
+    c = *tohash;
   }
   return NULL;
 }