1
0
Fork 0

net: netfilter: Use list_{next/prev}_entry instead of list_entry

This patch replace list_entry with list_prev_entry as it makes the
code more clear to read.

Signed-off-by: simran singhal <singhalsimran0@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
zero-colors
simran singhal 2017-03-29 11:15:40 +05:30 committed by Pablo Neira Ayuso
parent cdec26858e
commit cbbb40e2ec
1 changed files with 1 additions and 1 deletions

View File

@ -1905,7 +1905,7 @@ static int nf_tables_fill_rule_info(struct sk_buff *skb, struct net *net,
goto nla_put_failure;
if ((event != NFT_MSG_DELRULE) && (rule->list.prev != &chain->rules)) {
prule = list_entry(rule->list.prev, struct nft_rule, list);
prule = list_prev_entry(rule, list);
if (nla_put_be64(skb, NFTA_RULE_POSITION,
cpu_to_be64(prule->handle),
NFTA_RULE_PAD))