From: Junho Lee <tot0roprog@gmail.com>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH BlueZ v3 3/4] mesh: Fix inserting NULL into bool type arguments to false
Date: Mon, 14 Oct 2024 16:55:07 +0900 [thread overview]
Message-ID: <670cce5d.650a0220.14e0cd.22b4@mx.google.com> (raw)
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 --git a/mesh/net.c b/mesh/net.c
index 48032c64d..82c812b73 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 */
--
2.34.1
reply other threads:[~2024-10-14 7:55 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=670cce5d.650a0220.14e0cd.22b4@mx.google.com \
--to=tot0roprog@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.