advertising: parse_secondary: fix loop condition
authorChristian Eggers <ceggers@arri.de>
Fri, 23 Sep 2022 14:55:54 +0000 (16:55 +0200)
committerAyush Garg <ayush.garg@samsung.com>
Mon, 15 May 2023 09:25:55 +0000 (14:55 +0530)
"secondary" isn't an array of pointers, so the iterator can never be
NULL.

Signed-off-by: Manika Shrivastava <manika.sh@samsung.com>
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
src/advertising.c

index 78645d5..f0b2ce4 100644 (file)
@@ -1050,7 +1050,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;