[PATCH 3/4] netfilter: ipset: use list_is_first()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



For better readability, use list_is_first() instead of open-coded.

Signed-off-by: Geliang Tang <geliangtang@xxxxxxx>
---
 net/netfilter/ipset/ip_set_list_set.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/netfilter/ipset/ip_set_list_set.c b/net/netfilter/ipset/ip_set_list_set.c
index bbede95..9d757d6 100644
--- a/net/netfilter/ipset/ip_set_list_set.c
+++ b/net/netfilter/ipset/ip_set_list_set.c
@@ -288,7 +288,7 @@ list_set_uadd(struct ip_set *set, void *value, const struct ip_set_ext *ext,
 			n = list_next_entry(next, list);
 	} else {
 		/* Insert before prev element */
-		if (prev->list.prev != &map->members)
+		if (!list_is_first(&prev->list, &map->members))
 			n = list_prev_entry(prev, list);
 	}
 	/* Can we replace a timed out entry? */
-- 
2.5.0


--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux