diff mbox series

[BlueZ,1/9] advertising: parse_secondary: fix loop condition

Message ID 20220923102421.10336-2-ceggers@arri.de (mailing list archive)
State Superseded
Headers show
Series properties_changed: check for NULL iterator | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success
tedd_an/checkpatch success Checkpatch PASS
tedd_an/gitlint success Gitlint PASS
tedd_an/setupell success Setup ELL PASS
tedd_an/buildprep success Build Prep PASS
tedd_an/build success Build Configuration PASS
tedd_an/makecheck success Make Check PASS
tedd_an/makecheckvalgrind success Make Check PASS
tedd_an/makedistcheck success Make Distcheck PASS
tedd_an/build_extell success Build External ELL PASS
tedd_an/build_extell_make success Build Make with External ELL PASS
tedd_an/incremental_build success Pass
tedd_an/scan_build warning Scan-Build: client/gatt.c:2146:2: warning: Null pointer passed to 2nd parameter expecting 'nonnull' memcpy(*dst_value + offset, src_val, src_len); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 warning generated.

Commit Message

Christian Eggers Sept. 23, 2022, 10:24 a.m. UTC
"secondary" isn't an array of pointers, so the iterator can never be
NULL.
---
 src/advertising.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

bluez.test.bot@gmail.com Sept. 23, 2022, 11:21 a.m. UTC | #1
This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=679824

---Test result---

Test Summary:
CheckPatch                    PASS      12.59 seconds
GitLint                       FAIL      8.83 seconds
Prep - Setup ELL              PASS      26.35 seconds
Build - Prep                  PASS      0.79 seconds
Build - Configure             PASS      8.36 seconds
Build - Make                  PASS      747.77 seconds
Make Check                    PASS      11.00 seconds
Make Check w/Valgrind         PASS      289.46 seconds
Make Distcheck                PASS      239.58 seconds
Build w/ext ELL - Configure   PASS      8.42 seconds
Build w/ext ELL - Make        PASS      84.11 seconds
Incremental Build w/ patches  PASS      892.46 seconds
Scan Build                    WARNING   493.39 seconds

Details
##############################
Test: GitLint - FAIL
Desc: Run gitlint with rule in .gitlint
Output:
[BlueZ,9/9] battery: provided_battery_property_changed_cb: check for NULL iterator
1: T1 Title exceeds max length (82>80): "[BlueZ,9/9] battery: provided_battery_property_changed_cb: check for NULL iterator"


##############################
Test: Scan Build - WARNING
Desc: Run Scan Build with patches
Output:
*****************************************************************************
The bugs reported by the scan-build may or may not be caused by your patches.
Please check the list and fix the bugs if they are caused by your patch.
*****************************************************************************
client/gatt.c:2146:2: warning: Null pointer passed to 2nd parameter expecting 'nonnull'
        memcpy(*dst_value + offset, src_val, src_len);
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.




---
Regards,
Linux Bluetooth
diff mbox series

Patch

diff --git a/src/advertising.c b/src/advertising.c
index 1fe371a9f345..15ef44def031 100644
--- a/src/advertising.c
+++ b/src/advertising.c
@@ -1055,7 +1055,7 @@  static bool parse_secondary(DBusMessageIter *iter,
 
 	dbus_message_iter_get_basic(iter, &str);
 
-	for (sec = secondary; sec && sec->name; sec++) {
+	for (sec = secondary; sec->name; sec++) {
 		if (strcmp(str, sec->name))
 			continue;