diff options
| author | Michael Biebl <biebl@debian.org> | 2019-12-18 18:30:31 +0100 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2019-12-18 18:30:31 +0100 |
| commit | 4bde769dba8f804547ce1f5fcda731035d3d45f1 (patch) | |
| tree | 3a4907fdbf4972fad5a036ef64ce643d704e8733 /shared/systemd/src/basic/strv.h | |
| parent | bbf6329c27676323a899b7328575cc3f6c5f48cc (diff) | |
| parent | 28028b26b3371756811e95d894f709f4b1207c00 (diff) | |
Update upstream source from tag 'upstream/1.22.0'
Update to upstream version '1.22.0' with Debian dir a81ba1028908d08fc4866734c3df4a042bf9a511
Diffstat (limited to 'shared/systemd/src/basic/strv.h')
| -rw-r--r-- | shared/systemd/src/basic/strv.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/shared/systemd/src/basic/strv.h b/shared/systemd/src/basic/strv.h index e80964ac..fbfa96a5 100644 --- a/shared/systemd/src/basic/strv.h +++ b/shared/systemd/src/basic/strv.h @@ -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; \ |