Commit 498044bb authored by Varka Bhadram's avatar Varka Bhadram Committed by David S. Miller

netlink: remove bool varible

This patch removes the bool variable 'pass'.
If the swith case exist return true or return false.
Signed-off-by: default avatarVarka Bhadram <varkab@cdac.in>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c8a89c4a
...@@ -170,7 +170,6 @@ EXPORT_SYMBOL_GPL(netlink_remove_tap); ...@@ -170,7 +170,6 @@ EXPORT_SYMBOL_GPL(netlink_remove_tap);
static bool netlink_filter_tap(const struct sk_buff *skb) static bool netlink_filter_tap(const struct sk_buff *skb)
{ {
struct sock *sk = skb->sk; struct sock *sk = skb->sk;
bool pass = false;
/* We take the more conservative approach and /* We take the more conservative approach and
* whitelist socket protocols that may pass. * whitelist socket protocols that may pass.
...@@ -184,11 +183,10 @@ static bool netlink_filter_tap(const struct sk_buff *skb) ...@@ -184,11 +183,10 @@ static bool netlink_filter_tap(const struct sk_buff *skb)
case NETLINK_FIB_LOOKUP: case NETLINK_FIB_LOOKUP:
case NETLINK_NETFILTER: case NETLINK_NETFILTER:
case NETLINK_GENERIC: case NETLINK_GENERIC:
pass = true; return true;
break;
} }
return pass; return false;
} }
static int __netlink_deliver_tap_skb(struct sk_buff *skb, static int __netlink_deliver_tap_skb(struct sk_buff *skb,
......
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