Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1288525
| From | Geliang Tang <geliangtang@163.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 3/4] netfilter: ipset: use list_is_first() |
| Date | 2015-12-10 15:20 +0100 |
| Message-ID | <qEaeC-7jl-23@gated-at.bofh.it> (permalink) |
| References | <qEaeC-7jl-25@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
For better readability, use list_is_first() instead of open-coded.
Signed-off-by: Geliang Tang <geliangtang@163.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 linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH 3/4] netfilter: ipset: use list_is_first() Geliang Tang <geliangtang@163.com> - 2015-12-10 15:20 +0100
[PATCH 4/4] elevator: use list_is_{first,last} Geliang Tang <geliangtang@163.com> - 2015-12-10 15:30 +0100
csiph-web