smc: return boolean instead of integer in using_ipsec
PATCH 1/1 smc: return boolean instead of integer in using_ipsec
Return statements in functions returning bool should use true/false instead of 1/0.
This issue was detected with the help of Coccinelle.
--- net/smc/smc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/smc/smc.h +1 -1
@@ -258,7 +258,7 @@ static inline bool using_ipsec(struct smc_sock *smc)#else static inline bool using_ipsec (struct smc_sock *smc) { -return 0 ; +return false; }#endif
Signature · 1 line
2.7.4
Quoted 15 lines · 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 <[email protected]>--- net/smc/smc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)net/smc/smc.h +0
-0
net/smc/smc.h static inline bool using_ipsec(struct smc_sock *smc) · line 264
Quoted 8 lines
net/smc/smc.h +1
-1@@ -258,7 +258,7 @@ static inline bool using_ipsec(struct smc_sock *smc)#else static inline bool using_ipsec (struct smc_sock *smc) { -return 0 ; +return false; }#endif
Gustavo,
thanks for reporting, but your improvement seems to be incomplete. Besides changing line 260 of net/smc/smc.h, line 255 should be adapted the same way. Will you come up with a second patch version here?
Kind regards, Ursula Braun
Hi Ursula,
Quoting Ursula Braun <[email protected]>:
Quoted 21 lines · Gustavo A. R. Silva
Quoted 20 lines
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 <[email protected]>--- net/smc/smc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)net/smc/smc.h +1
-1@@ -258,7 +258,7 @@ static inline bool using_ipsec(struct smc_sock *smc)#else static inline bool using_ipsec (struct smc_sock *smc) { -return 0 ; +return false;
Quoted 9 lines
net/smc/smc.h static inline bool using_ipsec(struct smc_sock *smc) · line 264
Quoted 3 lines
net/smc/smc.h +0
-0}#endif Gustavo,
thanks for reporting, but your improvement seems to be incomplete. Besides changing line 260 ofnet/smc/smc.h, line 255 should be adapted the same way. Will you come up with a second patch version here?
You are correct. I'll send a new patch shortly.
Thanks for the feedback.
--
Gustavo