All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] batman-adv:Remove unnessary break statements for switch statement in the function batadv_bla_proccess_claim
@ 2015-06-11 15:10 ` Nicholas Krause
  0 siblings, 0 replies; 2+ messages in thread
From: Nicholas Krause @ 2015-06-11 15:10 UTC (permalink / raw)
  To: mareklindner-rVWd3aGhH2z5bpWLKbzFeg
  Cc: netdev-u79uwXL29TY76Z2rM5mHXA,
	b.a.t.m.a.n-ZwoEplunGu2X36UT3dwllkB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	antonio-x4xJYDvStAgysxA8WJXlww, davem-fT/PcQaiUtIeIZ0/mPfg9Q

This removes the unnessary break statements for the switch
statement in the function, batadv_blav_procces_claim for
checking the structure pointer, bla_dst's variable member,
type due to returning directly for the cases in this switch
if they evaluate to be equal to the value of the member
variable type of the structure pointer, bla_dst and thus
no need to avoid fallthrough with break statements in
this particular switch statement.

Signed-off-by: Nicholas Krause <xerofoify-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
 net/batman-adv/bridge_loop_avoidance.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/net/batman-adv/bridge_loop_avoidance.c b/net/batman-adv/bridge_loop_avoidance.c
index ac4b96e..c9a548a 100644
--- a/net/batman-adv/bridge_loop_avoidance.c
+++ b/net/batman-adv/bridge_loop_avoidance.c
@@ -961,23 +961,18 @@ static int batadv_bla_process_claim(struct batadv_priv *bat_priv,
 		if (batadv_handle_claim(bat_priv, primary_if, hw_src,
 					ethhdr->h_source, vid))
 			return 1;
-		break;
 	case BATADV_CLAIM_TYPE_UNCLAIM:
 		if (batadv_handle_unclaim(bat_priv, primary_if,
 					  ethhdr->h_source, hw_src, vid))
 			return 1;
-		break;
-
 	case BATADV_CLAIM_TYPE_ANNOUNCE:
 		if (batadv_handle_announce(bat_priv, hw_src, ethhdr->h_source,
 					   vid))
 			return 1;
-		break;
 	case BATADV_CLAIM_TYPE_REQUEST:
 		if (batadv_handle_request(bat_priv, primary_if, hw_src, ethhdr,
 					  vid))
 			return 1;
-		break;
 	}
 
 	batadv_dbg(BATADV_DBG_BLA, bat_priv,
-- 
2.1.4

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

* [B.A.T.M.A.N.] [PATCH] batman-adv:Remove unnessary break statements for switch statement in the function batadv_bla_proccess_claim
@ 2015-06-11 15:10 ` Nicholas Krause
  0 siblings, 0 replies; 2+ messages in thread
From: Nicholas Krause @ 2015-06-11 15:10 UTC (permalink / raw)
  To: mareklindner; +Cc: netdev, b.a.t.m.a.n, linux-kernel, antonio, davem

This removes the unnessary break statements for the switch
statement in the function, batadv_blav_procces_claim for
checking the structure pointer, bla_dst's variable member,
type due to returning directly for the cases in this switch
if they evaluate to be equal to the value of the member
variable type of the structure pointer, bla_dst and thus
no need to avoid fallthrough with break statements in
this particular switch statement.

Signed-off-by: Nicholas Krause <xerofoify@gmail.com>
---
 net/batman-adv/bridge_loop_avoidance.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/net/batman-adv/bridge_loop_avoidance.c b/net/batman-adv/bridge_loop_avoidance.c
index ac4b96e..c9a548a 100644
--- a/net/batman-adv/bridge_loop_avoidance.c
+++ b/net/batman-adv/bridge_loop_avoidance.c
@@ -961,23 +961,18 @@ static int batadv_bla_process_claim(struct batadv_priv *bat_priv,
 		if (batadv_handle_claim(bat_priv, primary_if, hw_src,
 					ethhdr->h_source, vid))
 			return 1;
-		break;
 	case BATADV_CLAIM_TYPE_UNCLAIM:
 		if (batadv_handle_unclaim(bat_priv, primary_if,
 					  ethhdr->h_source, hw_src, vid))
 			return 1;
-		break;
-
 	case BATADV_CLAIM_TYPE_ANNOUNCE:
 		if (batadv_handle_announce(bat_priv, hw_src, ethhdr->h_source,
 					   vid))
 			return 1;
-		break;
 	case BATADV_CLAIM_TYPE_REQUEST:
 		if (batadv_handle_request(bat_priv, primary_if, hw_src, ethhdr,
 					  vid))
 			return 1;
-		break;
 	}
 
 	batadv_dbg(BATADV_DBG_BLA, bat_priv,
-- 
2.1.4


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

end of thread, other threads:[~2015-06-11 15:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-11 15:10 [PATCH] batman-adv:Remove unnessary break statements for switch statement in the function batadv_bla_proccess_claim Nicholas Krause
2015-06-11 15:10 ` [B.A.T.M.A.N.] " Nicholas Krause

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.