[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <b415535e3c9784ee8529b3e7372b94e759b48bf4.1449755818.git.geliangtang@163.com>
Date: Thu, 10 Dec 2015 22:17:17 +0800
From: Geliang Tang <geliangtang@....com>
To: Pablo Neira Ayuso <pablo@...filter.org>,
Patrick McHardy <kaber@...sh.net>,
Jozsef Kadlecsik <kadlec@...ckhole.kfki.hu>,
"David S. Miller" <davem@...emloft.net>
Cc: Geliang Tang <geliangtang@....com>, Jens Axboe <axboe@...nel.dk>,
"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
Jan Kara <jack@...e.cz>, Josef Bacik <jbacik@...com>,
Josh Triplett <josh@...htriplett.org>,
Josh Poimboeuf <jpoimboe@...hat.com>,
Seth Jennings <sjenning@...hat.com>,
Jiri Kosina <jikos@...nel.org>,
Vojtech Pavlik <vojtech@...e.com>,
live-patching@...r.kernel.org, netfilter-devel@...r.kernel.org,
coreteam@...filter.org, netdev@...r.kernel.org,
linux-block@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH 3/4] netfilter: ipset: use list_is_first()
For better readability, use list_is_first() instead of open-coded.
Signed-off-by: Geliang Tang <geliangtang@....com>
---
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 netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists