[PATCH] batman-adv: fix boolreturn.cocci warnings

STALE3683d

2 messages, 2 authors, 2016-07-06 · open the first message on its own page

[PATCH] batman-adv: fix boolreturn.cocci warnings

From: kbuild test robot <hidden>
Date: 2016-07-06 02:50:35

net/batman-adv/bridge_loop_avoidance.c:1105:9-10: WARNING: return of 0/1 in function 'batadv_bla_process_claim' with return type bool

 Return statements in functions returning bool should use
 true/false instead of 1/0.
Generated by: scripts/coccinelle/misc/boolreturn.cocci

CC: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Fengguang Wu <redacted>
---

 bridge_loop_avoidance.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--- a/net/batman-adv/bridge_loop_avoidance.c
+++ b/net/batman-adv/bridge_loop_avoidance.c
@@ -1102,7 +1102,7 @@ static bool batadv_bla_process_claim(str
 
 	/* Let the loopdetect frames on the mesh in any case. */
 	if (bla_dst->type == BATADV_CLAIM_TYPE_LOOPDETECT)
-		return 0;
+		return false;
 
 	/* check if it is a claim frame. */
 	ret = batadv_check_claim_group(bat_priv, primary_if, hw_src, hw_dst,

Re: [B.A.T.M.A.N.] [PATCH] batman-adv: fix boolreturn.cocci warnings

From: Marek Lindner <hidden>
Date: 2016-07-06 14:00:14

On Wednesday, July 06, 2016 10:49:29 kbuild test robot wrote:
net/batman-adv/bridge_loop_avoidance.c:1105:9-10: WARNING: return of 0/1 in
function 'batadv_bla_process_claim' with return type bool

 Return statements in functions returning bool should use
 true/false instead of 1/0.
Generated by: scripts/coccinelle/misc/boolreturn.cocci

CC: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Fengguang Wu <redacted>
---

 bridge_loop_avoidance.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Applied in revision 36e7316.

Thanks,
Marek
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help