Skip to content

Commit

Permalink
netlink: remove bool varible
Browse files Browse the repository at this point in the history
This patch removes the bool variable 'pass'.
If the swith case exist return true or return false.

Signed-off-by: Varka Bhadram <varkab@cdac.in>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Varka Bhadram authored and David S. Miller committed Jul 17, 2014
1 parent c8a89c4 commit 498044b
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions net/netlink/af_netlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,6 @@ EXPORT_SYMBOL_GPL(netlink_remove_tap);
static bool netlink_filter_tap(const struct sk_buff *skb)
{
struct sock *sk = skb->sk;
bool pass = false;

/* We take the more conservative approach and
* whitelist socket protocols that may pass.
Expand All @@ -184,11 +183,10 @@ static bool netlink_filter_tap(const struct sk_buff *skb)
case NETLINK_FIB_LOOKUP:
case NETLINK_NETFILTER:
case NETLINK_GENERIC:
pass = true;
break;
return true;
}

return pass;
return false;
}

static int __netlink_deliver_tap_skb(struct sk_buff *skb,
Expand Down

0 comments on commit 498044b

Please sign in to comment.