]> git.karo-electronics.de Git - linux-beck.git/commitdiff
netlink: remove bool varible
authorVarka Bhadram <varkab@cdac.in>
Wed, 16 Jul 2014 05:29:47 +0000 (10:59 +0530)
committerDavid S. Miller <davem@davemloft.net>
Thu, 17 Jul 2014 06:15:00 +0000 (23:15 -0700)
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>
net/netlink/af_netlink.c

index 837ff9a5750374bfdbb817bdc495f3a069208317..1b38f7fe12f1f8e09006752333ca7ef5026294c7 100644 (file)
@@ -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.
@@ -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,