diff mbox

[net-next] netlink: remove bool varible

Message ID 1405488587-26119-1-git-send-email-varkabhadram@gmail.com
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Varka Bhadram July 16, 2014, 5:29 a.m. UTC
From: Varka Bhadram <varkab@cdac.in>

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>
---
 net/netlink/af_netlink.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

Comments

David Miller July 17, 2014, 6:15 a.m. UTC | #1
From: varkabhadram@gmail.com
Date: Wed, 16 Jul 2014 10:59:47 +0530

> From: Varka Bhadram <varkab@cdac.in>
> 
> 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>

This is fine, applied, thanks.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
index e8c9f97..5dd8193 100644
--- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
@@ -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,