diff options
Diffstat (limited to 'kernel/include')
-rw-r--r-- | kernel/include/linux/netfilter_ipv4/ip_set_ipmap.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/include/linux/netfilter_ipv4/ip_set_ipmap.h b/kernel/include/linux/netfilter_ipv4/ip_set_ipmap.h index 3d800ef..d1381b5 100644 --- a/kernel/include/linux/netfilter_ipv4/ip_set_ipmap.h +++ b/kernel/include/linux/netfilter_ipv4/ip_set_ipmap.h @@ -36,7 +36,7 @@ mask_to_bits(ip_set_ip_t mask) return bits; maskaddr = 0xFFFFFFFE; - while (--bits >= 0 && maskaddr != mask) + while (--bits > 0 && maskaddr != mask) maskaddr <<= 1; return bits; @@ -48,7 +48,7 @@ range_to_mask(ip_set_ip_t from, ip_set_ip_t to, unsigned int *bits) ip_set_ip_t mask = 0xFFFFFFFE; *bits = 32; - while (--(*bits) >= 0 && mask && (to & mask) != from) + while (--(*bits) > 0 && mask && (to & mask) != from) mask <<= 1; return mask; |