chiark / gitweb /
unit: instead of directly loading drop-in configuration snippets use conf_files_list_...
[elogind.git] / src / shared / strv.c
index 6b76d0eaef57616b11f3aa5f32f29de714236605..aed45d26128be847302ab570416387eb0d0a99a1 100644 (file)
@@ -370,6 +370,21 @@ fail:
         return NULL;
 }
 
+int strv_extend(char ***l, const char *value) {
+        char **c;
+
+        if (!value)
+                return 0;
+
+        c = strv_append(*l, value);
+        if (!c)
+                return -ENOMEM;
+
+        strv_free(*l);
+        *l = c;
+        return 0;
+}
+
 char **strv_uniq(char **l) {
         char **i;