Whamcloud - gitweb
Branch b1_6
authoradilger <adilger>
Wed, 12 Sep 2007 05:26:47 +0000 (05:26 +0000)
committeradilger <adilger>
Wed, 12 Sep 2007 05:26:47 +0000 (05:26 +0000)
Fix horrible code formatting that incidentally caused a signed/unsigned
compiler warning.

lnet/ulnds/socklnd/table.c

index eb390c4..986c5ce 100644 (file)
@@ -93,11 +93,14 @@ unsigned int key_from_int(int i)
  */
 unsigned int key_from_string(char *s)
 {
-    unsigned int result=0;
+    unsigned int result=0, i;
     unsigned char *n;
-    int i;
-    if (!s) return(1);
-    for (n=s,i=0;*n;n++,i++) result^=(*n*57)^*n*i;
+
+    if (!s)
+            return(1);
+    for (n = (unsigned char *)s, i = 0; *n; n++, i++)
+            result ^= (*n * 57) ^ *n * i;
+
     return(result);
 }