net/smc: return booleans instead of integers
authorGustavo A. R. Silva <gustavo@embeddedor.com>
Fri, 26 Jan 2018 08:28:50 +0000 (09:28 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 26 Jan 2018 15:41:56 +0000 (10:41 -0500)
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>
Signed-off-by: Ursula Braun <ubraun@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/smc/smc.h

index bfbe20234105563cfc16a7f5d748a02e3c846428..9518986c97b1846fcaac148b7b9f9a61bf1473f2 100644 (file)
@@ -252,12 +252,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