Skip to content

Commit

Permalink
ipvs: use list_del_init instead of list_del/INIT_LIST_HEAD
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Wei Yongjun authored and Pablo Neira Ayuso committed Sep 10, 2012
1 parent a672995 commit 0edd948
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions net/netfilter/ipvs/ip_vs_ctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -539,8 +539,7 @@ static int ip_vs_rs_unhash(struct ip_vs_dest *dest)
* Remove it from the rs_table table.
*/
if (!list_empty(&dest->d_list)) {
list_del(&dest->d_list);
INIT_LIST_HEAD(&dest->d_list);
list_del_init(&dest->d_list);
}

return 1;
Expand Down

0 comments on commit 0edd948

Please sign in to comment.