X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fbasic%2Fstrv.c;h=dab34d8e74ee91de78965975fa53ba479035521b;hb=f95cf7a0e475fcb8777c43081219320f7e3dc59b;hp=b6e6d505013619cd20e4daa929634d7b0eb58449;hpb=21ecddbbb2c9e06d080b2526a870898a8b90f52a;p=elogind.git diff --git a/src/basic/strv.c b/src/basic/strv.c index b6e6d5050..dab34d8e7 100644 --- a/src/basic/strv.c +++ b/src/basic/strv.c @@ -276,8 +276,7 @@ char **strv_split_newlines(const char *s) { return l; if (isempty(l[n-1])) { - free(l[n-1]); - l[n-1] = NULL; + l[n-1] = mfree(l[n-1]); } return l; @@ -633,6 +632,8 @@ char **strv_split_nulstr(const char *s) { return r; } +/// UNNEEDED by elogind +#if 0 bool strv_overlap(char **a, char **b) { char **i; @@ -658,8 +659,6 @@ char **strv_sort(char **l) { return l; } -/// UNNEEDED by elogind -#if 0 bool strv_equal(char **a, char **b) { if (!a || !b) return a == b; @@ -670,7 +669,6 @@ bool strv_equal(char **a, char **b) { return true; } -#endif // 0 void strv_print(char **l) { char **s; @@ -679,8 +677,6 @@ void strv_print(char **l) { puts(*s); } -/// UNNEEDED by elogind -#if 0 int strv_extendf(char ***l, const char *format, ...) { va_list ap; char *x; @@ -713,7 +709,6 @@ char **strv_reverse(char **l) { return l; } -#endif // 0 char **strv_shell_escape(char **l, const char *bad) { char **s; @@ -734,6 +729,7 @@ char **strv_shell_escape(char **l, const char *bad) { return l; } +#endif // 0 bool strv_fnmatch(char* const* patterns, const char *s, int flags) { char* const* p;