From: Mark Wooding Date: Fri, 29 Sep 2017 09:06:13 +0000 (+0100) Subject: server/addrmap.c (hash): Visually tighten the arithmetic. X-Git-Tag: 1.5.0~41^2~19 X-Git-Url: https://git.distorted.org.uk/~mdw/tripe/commitdiff_plain/f8950c27dbaa98501a64cc3bdb98657c64641c4e server/addrmap.c (hash): Visually tighten the arithmetic. --- diff --git a/server/addrmap.c b/server/addrmap.c index 140d0b6e..6091dbfc 100644 --- a/server/addrmap.c +++ b/server/addrmap.c @@ -76,9 +76,9 @@ static uint32 hash(const addr *a) { switch (a->sa.sa_family) { case AF_INET: - return (U32((AF_INET * 0x4eaac1b7ul) + - (a->sin.sin_addr.s_addr * 0xa5dbc837) + - (a->sin.sin_port * 0x3b049e83))); + return (U32(0x4eaac1b7ul*AF_INET + + 0xa5dbc837ul*a->sin.sin_addr.s_addr + + 0x3b049e83ul*a->sin.sin_port)); default: abort(); }