[cig-commits] r7507 - cs/cigma/branches/cigma-0.9/src

luis at geodynamics.org luis at geodynamics.org
Tue Jun 26 09:55:35 PDT 2007


Author: luis
Date: 2007-06-26 09:55:35 -0700 (Tue, 26 Jun 2007)
New Revision: 7507

Modified:
   cs/cigma/branches/cigma-0.9/src/hash.c
Log:
darcs patch:
  * Added extra parentheses to boolean clause in while loop
  This indicates to the compiler that the assignment is not a typo, eliminating
  the warning you get when compiling with -Wall



Modified: cs/cigma/branches/cigma-0.9/src/hash.c
===================================================================
--- cs/cigma/branches/cigma-0.9/src/hash.c	2007-06-26 16:54:41 UTC (rev 7506)
+++ cs/cigma/branches/cigma-0.9/src/hash.c	2007-06-26 16:55:35 UTC (rev 7507)
@@ -61,7 +61,7 @@
 {
     int c;
     int hash = 5381;
-    while (c = *str++)
+    while ((c = *str++))
         hash = hash * 33 + c;
     return hash == 0 ? 1 : hash;
 }



More information about the cig-commits mailing list