Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
cosmetics to please sonar
authorMartin Quinson <martin.quinson@loria.fr>
Thu, 23 Feb 2017 08:17:16 +0000 (09:17 +0100)
committerMartin Quinson <martin.quinson@loria.fr>
Thu, 23 Feb 2017 08:18:56 +0000 (09:18 +0100)
teshsuite/smpi/macro-shared/macro-shared.c

index a9f1e56..5c3ee9f 100644 (file)
@@ -15,12 +15,11 @@ static void* hash(char *str, uint64_t* ans)
 {
   char *tohash = str;
   *ans=5381;
 {
   char *tohash = str;
   *ans=5381;
-  int c;
   printf("hashing !\n");
   printf("hashing !\n");
-  c = *tohash++;
-  while (c!=0){
+  int c = *(tohash++);
+  while (c != 0) {
     *ans = ((*ans << 5) + *ans) + c; /* hash * 33 + c */
     *ans = ((*ans << 5) + *ans) + c; /* hash * 33 + c */
-    c = *tohash++;
+    c    = *(tohash++);
   }
   return NULL;
 }
   }
   return NULL;
 }