Changeset 18 for trunk/src/sh_hash.c
- Timestamp:
- Jan 28, 2006, 9:07:52 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/sh_hash.c
r10 r18 396 396 static int hashfunc(char *s) 397 397 { 398 unsigned n = 0;398 unsigned int n = 0; 399 399 400 400 for ( ; *s; s++) 401 401 n = 31 * n + *s; 402 return n & 0xFFFF;/* % TABSIZE*/; 402 403 return n & (TABSIZE - 1); /* % TABSIZE */; 403 404 } 404 405
Note:
See TracChangeset
for help on using the changeset viewer.