summaryrefslogtreecommitdiff
path: root/src/ipnets.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ipnets.c')
-rw-r--r--src/ipnets.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ipnets.c b/src/ipnets.c
index 97196fa..5a4a0a1 100644
--- a/src/ipnets.c
+++ b/src/ipnets.c
@@ -71,9 +71,9 @@ int block_ntoa(const char* s, struct in_addr* addr,
/* If we've been asked to truncate and the IP's
netmask is on a unit, then we can truncate */
if(format & INET_BLOCK_TRUNC &&
- zb(ntohl(netmask.s_addr)) % 8 == 0)
+ zb(ntohl(netmask->s_addr)) % 8 == 0)
{
- in_addr_t ip = ntohl(in_addr.s_addr);
+ in_addr_t ip = ntohl(addr->s_addr);
/* Loop through and print relevant octets */
int octets = (32 - zb(ip)) / 8;