Skip to contentSkip to conversation

bridge: return boolean instead of integer in br_multicast_is_router

PATCH Applied Gustavo A. R. Silva 3 participants 4 messages Jan 18, 2018 – Jan 22, 2018

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

PATCH 1/1 bridge: return boolean instead of integer in br_multicast_is_router

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

This issue was detected with the help of Coccinelle.

---
 net/bridge/br_private.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/bridge/br_private.h +1 -1
index 80559fd..8e13a64 100644
@@ -760,7 +760,7 @@ static inline void br_multicast_flood(struct net_bridge_mdb_entry *mdst,
 
 static inline bool br_multicast_is_router(struct net_bridge *br)
 {
-	return 0;
+	return false;
 }
 
 static inline bool br_multicast_querier_exists(struct net_bridge *br,
Signature · 1 line
2.7.4
#2 lore raw

Quoting Stephen Hemminger <[email protected]>:

Quoted 6 lines
Quoted 3 lines · On Thu, 18 Jan 2018 17:37:45 -0600 "Gustavo A. R. Silva"…

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

Quoted 8 lines
Quoted 3 lines

This issue was detected with the help of Coccinelle.

LGTM

Fixes 85b352693264 ("bridge: Fix build error when IGMP_SNOOPING is not enabled")

Thanks Stephen.
--
Gustavo