X-Git-Url: http://sjero.net/git/?p=wget;a=blobdiff_plain;f=src%2Fhash.c;h=7160006a67d31f37e17c400048e335788150d458;hp=273fd9a62d96fb4c025e9ee95b5b23f134dea89f;hb=4a08094db88011153adadbf995103770b20d2a31;hpb=73ff253e371f58dde04ce30f04c59f2000a1b7e5 diff --git a/src/hash.c b/src/hash.c index 273fd9a6..7160006a 100644 --- a/src/hash.c +++ b/src/hash.c @@ -630,7 +630,7 @@ hash_table_count (const struct hash_table *ht) * Support for hash tables whose keys are strings. * */ - + /* Base 31 hash function. Taken from Gnome's glib, modified to use standard C types. @@ -643,11 +643,11 @@ hash_string (const void *key) { const char *p = key; unsigned int h = *p; - + if (h) for (p += 1; *p != '\0'; p++) h = (h << 5) - h + *p; - + return h; } @@ -681,11 +681,11 @@ hash_string_nocase (const void *key) { const char *p = key; unsigned int h = c_tolower (*p); - + if (h) for (p += 1; *p != '\0'; p++) h = (h << 5) - h + c_tolower (*p); - + return h; }