Commit c1bc1d25 authored by Ian Morris's avatar Ian Morris Committed by Pablo Neira Ayuso

netfilter-bridge: layout of if statements

Eliminate some checkpatch issues by improved layout of if statements.

No changes detected by objdiff.
Signed-off-by: default avatarIan Morris <ipm@chirality.org.uk>
Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
parent abcdd9a6
...@@ -65,8 +65,8 @@ ebt_ip6_mt(const struct sk_buff *skb, struct xt_action_param *par) ...@@ -65,8 +65,8 @@ ebt_ip6_mt(const struct sk_buff *skb, struct xt_action_param *par)
return false; return false;
if (FWINV(info->protocol != nexthdr, EBT_IP6_PROTO)) if (FWINV(info->protocol != nexthdr, EBT_IP6_PROTO))
return false; return false;
if (!(info->bitmask & ( EBT_IP6_DPORT | if (!(info->bitmask & (EBT_IP6_DPORT |
EBT_IP6_SPORT | EBT_IP6_ICMP6))) EBT_IP6_SPORT | EBT_IP6_ICMP6)))
return true; return true;
/* min icmpv6 headersize is 4, so sizeof(_pkthdr) is ok. */ /* min icmpv6 headersize is 4, so sizeof(_pkthdr) is ok. */
......
...@@ -161,7 +161,7 @@ ebt_basic_match(const struct ebt_entry *e, const struct sk_buff *skb, ...@@ -161,7 +161,7 @@ ebt_basic_match(const struct ebt_entry *e, const struct sk_buff *skb,
for (i = 0; i < 6; i++) for (i = 0; i < 6; i++)
verdict |= (h->h_source[i] ^ e->sourcemac[i]) & verdict |= (h->h_source[i] ^ e->sourcemac[i]) &
e->sourcemsk[i]; e->sourcemsk[i];
if (FWINV2(verdict != 0, EBT_ISOURCE) ) if (FWINV2(verdict != 0, EBT_ISOURCE))
return 1; return 1;
} }
if (e->bitmask & EBT_DESTMAC) { if (e->bitmask & EBT_DESTMAC) {
...@@ -169,7 +169,7 @@ ebt_basic_match(const struct ebt_entry *e, const struct sk_buff *skb, ...@@ -169,7 +169,7 @@ ebt_basic_match(const struct ebt_entry *e, const struct sk_buff *skb,
for (i = 0; i < 6; i++) for (i = 0; i < 6; i++)
verdict |= (h->h_dest[i] ^ e->destmac[i]) & verdict |= (h->h_dest[i] ^ e->destmac[i]) &
e->destmsk[i]; e->destmsk[i];
if (FWINV2(verdict != 0, EBT_IDEST) ) if (FWINV2(verdict != 0, EBT_IDEST))
return 1; return 1;
} }
return 0; return 0;
...@@ -673,7 +673,7 @@ ebt_check_entry(struct ebt_entry *e, struct net *net, ...@@ -673,7 +673,7 @@ ebt_check_entry(struct ebt_entry *e, struct net *net,
BUGPRINT("Unknown flag for inv bitmask\n"); BUGPRINT("Unknown flag for inv bitmask\n");
return -EINVAL; return -EINVAL;
} }
if ( (e->bitmask & EBT_NOPROTO) && (e->bitmask & EBT_802_3) ) { if ((e->bitmask & EBT_NOPROTO) && (e->bitmask & EBT_802_3)) {
BUGPRINT("NOPROTO & 802_3 not allowed\n"); BUGPRINT("NOPROTO & 802_3 not allowed\n");
return -EINVAL; return -EINVAL;
} }
...@@ -1370,7 +1370,7 @@ static inline int ebt_make_watchername(const struct ebt_entry_watcher *w, ...@@ -1370,7 +1370,7 @@ static inline int ebt_make_watchername(const struct ebt_entry_watcher *w,
char name[EBT_FUNCTION_MAXNAMELEN] = {}; char name[EBT_FUNCTION_MAXNAMELEN] = {};
strlcpy(name, w->u.watcher->name, sizeof(name)); strlcpy(name, w->u.watcher->name, sizeof(name));
if (copy_to_user(hlp , name, EBT_FUNCTION_MAXNAMELEN)) if (copy_to_user(hlp, name, EBT_FUNCTION_MAXNAMELEN))
return -EFAULT; return -EFAULT;
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment