===== net/ipv4/fib_semantics.c 1.16 vs edited ===== --- 1.16/net/ipv4/fib_semantics.c 2004-09-18 04:11:04 +10:00 +++ edited/net/ipv4/fib_semantics.c 2004-09-18 14:08:55 +10:00 @@ -52,7 +52,8 @@ static unsigned int fib_info_cnt; #define DEVINDEX_HASHBITS 8 -static struct hlist_head fib_info_devhash[DEVINDEX_HASHBITS]; +#define DEVINDEX_HASHSIZE (1U << DEVINDEX_HASHBITS) +static struct hlist_head fib_info_devhash[DEVINDEX_HASHSIZE]; #ifdef CONFIG_IP_ROUTE_MULTIPATH @@ -229,7 +230,7 @@ static inline unsigned int fib_devindex_hashfn(unsigned int val) { - unsigned int mask = ((1U << DEVINDEX_HASHBITS) - 1); + unsigned int mask = DEVINDEX_HASHSIZE - 1; return (val ^ (val >> DEVINDEX_HASHBITS) ^