From: Lennart Poettering Date: Sun, 14 Feb 2010 21:38:07 +0000 (+0100) Subject: strv: make sure empty string lists result in a valid empty string in strv_join() X-Git-Tag: 0.git+20100605+dfd8ee-1~293 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8d49745c2be3385ff3c20f4c848abfe700b06435;p=systemd strv: make sure empty string lists result in a valid empty string in strv_join() --- diff --git a/strv.c b/strv.c index 25ea92c1..4cea86e0 100644 --- a/strv.c +++ b/strv.c @@ -281,6 +281,8 @@ char *strv_join(char **l, const char *separator) { e = stpcpy(e, *s); } + *e = 0; + return r; }