mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
netfilter: convert while loops to for loops
This is to facilitate converting from a singly-linked list to an array of elements. Signed-off-by: Aaron Conole <[email protected]> Signed-off-by: Pablo Neira Ayuso <[email protected]>
This commit is contained in:
parent
d415b9eb76
commit
679972f3be
2 changed files with 6 additions and 8 deletions
|
|
@ -1008,10 +1008,10 @@ int br_nf_hook_thresh(unsigned int hook, struct net *net,
|
|||
struct nf_hook_state state;
|
||||
int ret;
|
||||
|
||||
elem = rcu_dereference(net->nf.hooks[NFPROTO_BRIDGE][hook]);
|
||||
|
||||
while (elem && (nf_hook_entry_priority(elem) <= NF_BR_PRI_BRNF))
|
||||
elem = rcu_dereference(elem->next);
|
||||
for (elem = rcu_dereference(net->nf.hooks[NFPROTO_BRIDGE][hook]);
|
||||
elem && nf_hook_entry_priority(elem) <= NF_BR_PRI_BRNF;
|
||||
elem = rcu_dereference(elem->next))
|
||||
;
|
||||
|
||||
if (!elem)
|
||||
return okfn(net, sk, skb);
|
||||
|
|
|
|||
Loading…
Reference in a new issue