Fix for problem found by Ken McLeod <thecloud@apple.com>

hash function return value not constrained.
This commit is contained in:
pdw
2005-10-26 20:27:50 +00:00
parent 98ffcb5293
commit 3f2d5210c9

View File

@@ -19,7 +19,7 @@ int serv_hash_compare(void* a, void* b) {
int serv_hash_hash(void* key) { int serv_hash_hash(void* key) {
ip_service* serv = (ip_service*)key; ip_service* serv = (ip_service*)key;
return serv->protocol; return serv->protocol % hash_table_size;
} }
void* serv_hash_copy_key(void* orig) { void* serv_hash_copy_key(void* orig) {