server/addrmap.c (hash): Visually tighten the arithmetic.
[tripe] / server / addrmap.c
index 140d0b6..6091dbf 100644 (file)
@@ -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();
   }