diff options
Diffstat (limited to 'src/shared/strv.c')
-rw-r--r-- | src/shared/strv.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/shared/strv.c b/src/shared/strv.c index 6b76d0eaef..aed45d2612 100644 --- a/src/shared/strv.c +++ b/src/shared/strv.c @@ -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; |