diff mbox series

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

Message ID 20220923102421.10336-2-ceggers@arri.de
State New
Headers show
Series properties_changed: check for NULL iterator | expand

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(-)
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;