chiark / gitweb /
strv: add new STR_IN_SET() macro that operates similar to IN_SET() but for strings
authorLennart Poettering <lennart@poettering.net>
Wed, 5 Mar 2014 02:34:48 +0000 (03:34 +0100)
committerLennart Poettering <lennart@poettering.net>
Wed, 5 Mar 2014 02:34:48 +0000 (03:34 +0100)
src/shared/strv.h

index 13a4bb6..618951c 100644 (file)
@@ -116,3 +116,5 @@ void strv_print(char **l);
                 }                                               \
                 _l;                                             \
         })
+
+#define STR_IN_SET(x, ...) strv_contains(STRV_MAKE(__VA_ARGS__), x)