From 4eec8b3824d49c1c0503ebbf7844a4e312bc29e1 Mon Sep 17 00:00:00 2001 From: "/C=EU/ST=EU/CN=Jozsef Kadlecsik/emailAddress=kadlec@blackhole.kfki.hu" Date: Thu, 13 Nov 2008 09:36:37 +0000 Subject: 2.4.4 - Premature checking prevents to add valid elements to hash types, fixed (bug reported by JC Janos). - Local variable shadows another variable, fixed (reported by Jan Engelhardt). - More compiler warning options added and warnings fixed. --- kernel/include/linux/netfilter_ipv4/ip_set_ipmap.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'kernel/include/linux') 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; -- cgit v1.2.3