X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fshared%2Fstrv.c;h=d44a72fc484d09966ac745066499a71cedd05c65;hb=ce5792dac67c5ae5656f1f9665b777d44af4cb35;hp=ee45ad1d0f3bb434044462696f675432e28c3ed4;hpb=2eec67acbb00593e414549a7e5b35eb7dd776b1b;p=elogind.git diff --git a/src/shared/strv.c b/src/shared/strv.c index ee45ad1d0..d44a72fc4 100644 --- a/src/shared/strv.c +++ b/src/shared/strv.c @@ -80,9 +80,10 @@ void strv_clear(char **l) { *l = NULL; } -void strv_free(char **l) { +char **strv_free(char **l) { strv_clear(l); free(l); + return NULL; } char **strv_copy(char * const *l) { @@ -277,7 +278,7 @@ char **strv_split_newlines(const char *s) { return l; } -int strv_split_quoted(char ***t, const char *s, bool relax) { +int strv_split_quoted(char ***t, const char *s, UnquoteFlags flags) { size_t n = 0, allocated = 0; _cleanup_strv_free_ char **l = NULL; int r; @@ -288,7 +289,7 @@ int strv_split_quoted(char ***t, const char *s, bool relax) { for (;;) { _cleanup_free_ char *word = NULL; - r = unquote_first_word(&s, &word, relax); + r = unquote_first_word(&s, &word, flags); if (r < 0) return r; if (r == 0)