sd-bus: work around ubsan warning
ubsan complains that we add an offset to a NULL ptr here in some cases. Which isn't really a bug though, since we only use it as the end condition for a for loop, but we can still fix it... Fixes: #15522
This commit is contained in:
+1
-1
@@ -111,7 +111,7 @@ bool strv_overlap(char * const *a, char * const *b) _pure_;
|
||||
(s)--)
|
||||
|
||||
#define STRV_FOREACH_PAIR(x, y, l) \
|
||||
for ((x) = (l), (y) = (x+1); (x) && *(x) && *(y); (x) += 2, (y) = (x + 1))
|
||||
for ((x) = (l), (y) = (x) ? (x+1) : NULL; (x) && *(x) && *(y); (x) += 2, (y) = (x + 1))
|
||||
|
||||
char **strv_sort(char **l);
|
||||
void strv_print(char * const *l);
|
||||
|
||||
Reference in New Issue
Block a user