Skip to contentSkip to conversation

s390/qeth: use true and false for boolean values

PATCH Applied Gustavo A. R. Silva 2 participants 2 messages Aug 5, 2018 – Aug 6, 2018

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 s390/qeth: use true and false for boolean values

Return statements in functions returning bool should use true or false instead of an integer value.

This issue was detected with the help of Coccinelle.

---
 drivers/s390/net/qeth_l3_main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/s390/net/qeth_l3_main.c +2 -2
index 1833e75..7175086 100644
@@ -117,9 +117,9 @@ static bool qeth_l3_is_addr_covered_by_ipato(struct qeth_card *card,
 	int rc = 0;
 
 	if (!card->ipato.enabled)
-		return 0;
+		return false;
 	if (addr->type != QETH_IP_TYPE_NORMAL)
-		return 0;
+		return false;
 
 	qeth_l3_convert_addr_to_bits((u8 *) &addr->u, addr_bits,
 				  (addr->proto == QETH_PROT_IPV4)? 4:16);
Signature · 1 line
2.7.4
#1 lore raw
Quoted 6 lines · Gustavo A. R. Silva

Return statements in functions returning bool should use true or false instead of an integer value.

This issue was detected with the help of Coccinelle.

Queued up for net-next, thanks.

Quoted 21 lines
---
 drivers/s390/net/qeth_l3_main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/s390/net/qeth_l3_main.c +2 -2
index 1833e75..7175086 100644
@@ -117,9 +117,9 @@ static bool qeth_l3_is_addr_covered_by_ipato(struct qeth_card *card,
 	int rc = 0;
 
 	if (!card->ipato.enabled)
-		return 0;
+		return false;
 	if (addr->type != QETH_IP_TYPE_NORMAL)
-		return 0;
+		return false;
 
 	qeth_l3_convert_addr_to_bits((u8 *) &addr->u, addr_bits,
 				  (addr->proto == QETH_PROT_IPV4)? 4:16);