Merge pull request #13436 from systemd/hidden-units-are-good-units

Hidden units are good units
This commit is contained in:
Yu Watanabe
2019-08-31 02:53:54 +09:00
committed by GitHub
4 changed files with 43 additions and 11 deletions
+12
View File
@@ -157,6 +157,18 @@ void strv_print(char **l);
_found; \
})
#define ENDSWITH_SET(p, ...) \
({ \
const char *_p = (p); \
char *_found = NULL, **_i; \
STRV_FOREACH(_i, STRV_MAKE(__VA_ARGS__)) { \
_found = endswith(_p, *_i); \
if (_found) \
break; \
} \
_found; \
})
#define FOREACH_STRING(x, y, ...) \
for (char **_l = STRV_MAKE(({ x = y; }), ##__VA_ARGS__); \
x; \