changed hash function
authorceriel <none@none>
Sat, 7 Feb 1987 00:14:51 +0000 (00:14 +0000)
committerceriel <none@none>
Sat, 7 Feb 1987 00:14:51 +0000 (00:14 +0000)
util/topgen/hash.c

index c8c4582..f0665e9 100644 (file)
@@ -23,8 +23,8 @@ hash(string) char *string; {
 
        if (strcmp(string,"ANY") == 0) return 128;
        for (sum=i=0,p=string;*p;i += 3)
-               sum += (*p++)<<(i&07);
-       return sum % 127;
+               sum += (*p++)<<(i&03);
+       return sum % 128;
 }