diff mbox series

[BlueZ,3/4] mesh: Fix inserting NULL into bool type arguments to false

Message ID 66ff9a34.170a0220.32b24b.8523@mx.google.com (mailing list archive)
State Superseded
Headers show
Series mesh: Fix segmentation behavior of Lower transport layer | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success
tedd_an/CheckPatch success CheckPatch PASS
tedd_an/GitLint success Gitlint PASS

Commit Message

Junho Lee Oct. 4, 2024, 7:33 a.m. UTC
Inserting NULL into a variable of type bool is undefined behavior and
inconsistent.
---
 mesh/net.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
diff mbox series

Patch

diff --git a/mesh/net.c b/mesh/net.c
index 41e415b65..f185f0280 100644
--- a/mesh/net.c
+++ b/mesh/net.c
@@ -2649,7 +2649,7 @@  static enum _relay_advice packet_received(void *user_data,
 						msg, app_msg_len);
 				}
 			} else {
-				seg_rxed(net, NULL, iv_index, net_ttl,
+				seg_rxed(net, false, iv_index, net_ttl,
 						net_seq, net_idx, net_src,
 						net_dst, key_aid, net_szmic,
 						net_seqZero, net_segO, net_segN,
@@ -2657,10 +2657,10 @@  static enum _relay_advice packet_received(void *user_data,
 			}
 
 		} else {
-			msg_rxed(net, NULL, iv_index, net_ttl, net_seq, net_idx,
-					net_src, net_dst, key_aid, false,
-					false, net_seq & SEQ_ZERO_MASK, msg,
-					app_msg_len);
+			msg_rxed(net, false, iv_index, net_ttl, net_seq,
+					net_idx, net_src, net_dst, key_aid,
+					false, false, net_seq & SEQ_ZERO_MASK,
+					msg, app_msg_len);
 		}
 
 		/* If this is one of our Unicast addresses, disallow relay */