chiark / gitweb /
set nice/oom_adjust only when asked for
[elogind.git] / strv.c
diff --git a/strv.c b/strv.c
index faa878c006748c0e0fc21f4c7ea004636224c73f..7e0810bffe48ddb8b71e82b36d8498d7ec8fbf14 100644 (file)
--- a/strv.c
+++ b/strv.c
@@ -145,3 +145,13 @@ fail:
         return NULL;
 
 }
+
+bool strv_contains(char **l, const char *s) {
+        char **i;
+
+        STRV_FOREACH(i, l)
+                if (streq(*i, s))
+                        return true;
+
+        return false;
+}