summaryrefslogtreecommitdiff
path: root/src/basic
diff options
context:
space:
mode:
authorMartin Pitt <martin.pitt@ubuntu.com>2016-09-27 16:25:27 +0200
committerGitHub <noreply@github.com>2016-09-27 16:25:27 +0200
commitb8fafaf4a1cffd02389d61ed92ca7acb1b8c739c (patch)
tree86ebd6e5617bc070af89556aed247b4eb1f6a6ea /src/basic
parent629abfc23f4e8d61ec0e952182e8200656b2bbe1 (diff)
parent9aa8fa701b79b74d118df8dbda0940f74aa8735b (diff)
Merge pull request #4220 from keszybz/show-and-formatting-fixes
Show and formatting fixes
Diffstat (limited to 'src/basic')
-rw-r--r--src/basic/strv.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/basic/strv.h b/src/basic/strv.h
index 683ce83a2a..fec2597db0 100644
--- a/src/basic/strv.h
+++ b/src/basic/strv.h
@@ -141,6 +141,11 @@ void strv_print(char **l);
})
#define STR_IN_SET(x, ...) strv_contains(STRV_MAKE(__VA_ARGS__), x)
+#define STRPTR_IN_SET(x, ...) \
+ ({ \
+ const char* _x = (x); \
+ _x && strv_contains(STRV_MAKE(__VA_ARGS__), _x); \
+ })
#define FOREACH_STRING(x, ...) \
for (char **_l = ({ \