summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--netifaces.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/netifaces.c b/netifaces.c
index fa18add..87193ee 100644
--- a/netifaces.c
+++ b/netifaces.c
@@ -462,9 +462,9 @@ string_from_netmask (struct sockaddr *addr,
--zx;
if (x & 0x0f)
zx -= 4;
- if (x & 0x03)
+ if (x & 0x33)
zx -= 2;
- if (x & 0x05)
+ if (x & 0x55)
zx -= 1;
zeroes += zx;