netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] smc: return booleans instead of integers
@ 2018-01-19 20:54 Gustavo A. R. Silva
  2018-01-22 11:58 ` Ursula Braun
  0 siblings, 1 reply; 5+ messages in thread
From: Gustavo A. R. Silva @ 2018-01-19 20:54 UTC (permalink / raw)
  To: Ursula Braun, David S. Miller
  Cc: linux-s390, netdev, linux-kernel, Gustavo A. R. Silva

Return statements in functions returning bool should use
true/false instead of 1/0.

This issue was detected with the help of Coccinelle.

Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
Changes in v2:
 - Fix function using_ipsec as suggested by Ursula Braun.
 - Update subject line.

 net/smc/smc.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/smc/smc.h b/net/smc/smc.h
index 0bee9d1..6328565 100644
--- a/net/smc/smc.h
+++ b/net/smc/smc.h
@@ -253,12 +253,12 @@ static inline int smc_uncompress_bufsize(u8 compressed)
 static inline bool using_ipsec(struct smc_sock *smc)
 {
 	return (smc->clcsock->sk->sk_policy[0] ||
-		smc->clcsock->sk->sk_policy[1]) ? 1 : 0;
+		smc->clcsock->sk->sk_policy[1]) ? true : false;
 }
 #else
 static inline bool using_ipsec(struct smc_sock *smc)
 {
-	return 0;
+	return false;
 }
 #endif
 
-- 
2.7.4

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

end of thread, other threads:[~2018-01-23 11:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-19 20:54 [PATCH v2] smc: return booleans instead of integers Gustavo A. R. Silva
2018-01-22 11:58 ` Ursula Braun
2018-01-22 23:38   ` Gustavo A. R. Silva
2018-01-23  0:31   ` Joe Perches
2018-01-23 11:44     ` Ursula Braun

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).