diff options
author | Nicolai <NicolaiSoeborg@users.noreply.github.com> | 2016-12-23 20:44:45 +0100 |
---|---|---|
committer | Nicolai <NicolaiSoeborg@users.noreply.github.com> | 2016-12-23 20:44:45 +0100 |
commit | ea756ac4ad511cab67b0347cd318945bea86a8b9 (patch) | |
tree | 8ca374d7af5fc7ac991dcebd22cda43973139b0f /plugins/check_dns.c | |
parent | 22e78763ea5a1b26b4e44980a3a1410368936846 (diff) | |
download | monitoring-plugins-ea756ac4ad511cab67b0347cd318945bea86a8b9.tar.gz |
check_dns: Tests and info
Diffstat (limited to 'plugins/check_dns.c')
-rw-r--r-- | plugins/check_dns.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/check_dns.c b/plugins/check_dns.c index 4067c14b..5feafc80 100644 --- a/plugins/check_dns.c +++ b/plugins/check_dns.c @@ -308,7 +308,7 @@ ip_match_cidr(const char *addr, const char *cidr_ro) mask = atoi(mask_c); /* https://www.cryptobells.com/verifying-ips-in-a-subnet-in-php/ */ - return ( ip2long(addr) & ~ ( ( 1 << ( 32 - mask ) ) - 1 ) ) == ( ip2long(subnet) >> (32 - mask) ) << (32 - mask); + return (ip2long(addr) & ~((1 << (32 - mask)) - 1)) == (ip2long(subnet) >> (32 - mask)) << (32 - mask); } unsigned long |