summaryrefslogtreecommitdiffstats
path: root/lib/strv.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/strv.c')
-rw-r--r--lib/strv.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/strv.c b/lib/strv.c
index e030033b6..ddc2a0c5d 100644
--- a/lib/strv.c
+++ b/lib/strv.c
@@ -373,6 +373,17 @@ int strv_extendf(char ***l, const char *format, ...) {
return strv_consume(l, x);
}
+int strv_extendv(char ***l, const char *format, va_list ap) {
+ char *x;
+ int r;
+
+ r = vasprintf(&x, format, ap);
+ if (r < 0)
+ return -ENOMEM;
+
+ return strv_consume(l, x);
+}
+
char **strv_reverse(char **l) {
unsigned n, i;