All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] netlink: remove bool varible
@ 2014-07-16  5:29 varkabhadram
  2014-07-17  6:15 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: varkabhadram @ 2014-07-16  5:29 UTC (permalink / raw)
  To: netdev; +Cc: linux-kernel, davem, Varka Bhadram

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(-)

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,
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net-next] netlink: remove bool varible
  2014-07-16  5:29 [PATCH net-next] netlink: remove bool varible varkabhadram
@ 2014-07-17  6:15 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2014-07-17  6:15 UTC (permalink / raw)
  To: varkabhadram; +Cc: netdev, linux-kernel, varkab

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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-07-17  6:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-16  5:29 [PATCH net-next] netlink: remove bool varible varkabhadram
2014-07-17  6:15 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.