X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Fbasic%2Fstrv.c;h=dab34d8e74ee91de78965975fa53ba479035521b;hp=ea5e57acdb0430406f7d8c7b03652cbe207163c8;hb=d76bb3c179b7a32b109e39aa87ff09c8f5a8c178;hpb=d1325d57413c007e17847074c70005c40e32bc9d diff --git a/src/basic/strv.c b/src/basic/strv.c index ea5e57acd..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;