summaryrefslogtreecommitdiff
path: root/src/basic/strv.h
diff options
context:
space:
mode:
authorFelipe Sateler <fsateler@debian.org>2019-02-20 21:24:33 -0300
committerFelipe Sateler <fsateler@debian.org>2019-02-20 21:24:33 -0300
commit7c20daf69c4411979b7f8902f3601d1cdc56cc07 (patch)
treed59b9989ce55ed23693e80974d94c856f1c2c8b1 /src/basic/strv.h
parent6e866b331d7cd4a5e0759dd160dea6edabd3678e (diff)
downloadsystemd-8334ea1698549f336631f37714499a91b140a271.tar.gz
New upstream version 241upstream/241
Diffstat (limited to 'src/basic/strv.h')
-rw-r--r--src/basic/strv.h15
1 files changed, 4 insertions, 11 deletions
diff --git a/src/basic/strv.h b/src/basic/strv.h
index aa4cd4aaca..392cab65be 100644
--- a/src/basic/strv.h
+++ b/src/basic/strv.h
@@ -156,17 +156,10 @@ void strv_print(char **l);
_found; \
})
-#define FOREACH_STRING(x, ...) \
- for (char **_l = ({ \
- char **_ll = STRV_MAKE(__VA_ARGS__); \
- x = _ll ? _ll[0] : NULL; \
- _ll; \
- }); \
- _l && *_l; \
- x = ({ \
- _l ++; \
- _l[0]; \
- }))
+#define FOREACH_STRING(x, y, ...) \
+ for (char **_l = STRV_MAKE(({ x = y; }), ##__VA_ARGS__); \
+ x; \
+ x = *(++_l))
char **strv_reverse(char **l);
char **strv_shell_escape(char **l, const char *bad);