summaryrefslogtreecommitdiff
path: root/strv.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-02-14 22:38:07 +0100
committerLennart Poettering <lennart@poettering.net>2010-02-14 22:38:07 +0100
commit8d49745c2be3385ff3c20f4c848abfe700b06435 (patch)
tree0d03f5fe412947198f921dfd61f7cac7c36e8ff9 /strv.c
parent100a76ee327132db201beda0fa432af79a3ff9fd (diff)
strv: make sure empty string lists result in a valid empty string in strv_join()
Diffstat (limited to 'strv.c')
-rw-r--r--strv.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/strv.c b/strv.c
index 25ea92c112..4cea86e04f 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;
}