basic: Allow to call STRV_FOREACH_BACKWARDS() with a char * const * strv

This commit is contained in:
Benjamin Robin 2020-05-10 18:33:16 +02:00
parent f1eb0ccd9e
commit 147d8fc1a7

View file

@ -106,7 +106,7 @@ bool strv_overlap(char * const *a, char * const *b) _pure_;
#define STRV_FOREACH_BACKWARDS(s, l) \
for (s = ({ \
char **_l = l; \
typeof(l) _l = l; \
_l ? _l + strv_length(_l) - 1U : NULL; \
}); \
(l) && ((s) >= (l)); \