diff options
author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2012-09-05 14:21:53 -0400 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2012-09-10 03:48:55 -0400 |
commit | 0edd94887d19ad73539477395c17ea0d6898947a (patch) | |
tree | 366912d7f49699052941689f8fe88aad278f8da2 /net/netfilter/ipvs | |
parent | a67299556ea1aa56daaeb985fd32295dacecba1a (diff) |
ipvs: use list_del_init instead of list_del/INIT_LIST_HEAD
Using list_del_init() instead of list_del() + INIT_LIST_HEAD().
spatch with a semantic match is used to found this problem.
(http://coccinelle.lip6.fr/)
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/netfilter/ipvs')
-rw-r--r-- | net/netfilter/ipvs/ip_vs_ctl.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/netfilter/ipvs/ip_vs_ctl.c b/net/netfilter/ipvs/ip_vs_ctl.c index 767cc12da0f..37b38d0791c 100644 --- a/net/netfilter/ipvs/ip_vs_ctl.c +++ b/net/netfilter/ipvs/ip_vs_ctl.c | |||
@@ -539,8 +539,7 @@ static int ip_vs_rs_unhash(struct ip_vs_dest *dest) | |||
539 | * Remove it from the rs_table table. | 539 | * Remove it from the rs_table table. |
540 | */ | 540 | */ |
541 | if (!list_empty(&dest->d_list)) { | 541 | if (!list_empty(&dest->d_list)) { |
542 | list_del(&dest->d_list); | 542 | list_del_init(&dest->d_list); |
543 | INIT_LIST_HEAD(&dest->d_list); | ||
544 | } | 543 | } |
545 | 544 | ||
546 | return 1; | 545 | return 1; |