summaryrefslogtreecommitdiff
path: root/src/test/test-string-util.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2021-01-05 15:03:41 +0100
committerLennart Poettering <lennart@poettering.net>2021-01-06 17:24:46 +0100
commitc2bc710b247db83d7964f2259144c0c70defe2da (patch)
treee1982e0816bc2ddea91410999318dde40d134549 /src/test/test-string-util.c
parent0ec1dc5ba395d797a0f7eaec88ba58e1b99a2ef3 (diff)
downloadsystemd-c2bc710b247db83d7964f2259144c0c70defe2da.tar.gz
string-util: imply NULL termination of strextend() argument list
The trailing NULL in the argument list is now implied (similar to what we already have in place in strjoin()).
Diffstat (limited to 'src/test/test-string-util.c')
-rw-r--r--src/test/test-string-util.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/test/test-string-util.c b/src/test/test-string-util.c
index b74eb180f3..67f083ff93 100644
--- a/src/test/test-string-util.c
+++ b/src/test/test-string-util.c
@@ -244,9 +244,9 @@ static void test_strextend(void) {
assert_se(strextend(&str, NULL));
assert_se(streq_ptr(str, ""));
- assert_se(strextend(&str, "", "0", "", "", "123", NULL));
+ assert_se(strextend(&str, "", "0", "", "", "123"));
assert_se(streq_ptr(str, "0123"));
- assert_se(strextend(&str, "456", "78", "9", NULL));
+ assert_se(strextend(&str, "456", "78", "9"));
assert_se(streq_ptr(str, "0123456789"));
}
@@ -265,13 +265,13 @@ static void test_strextend_with_separator(void) {
assert_se(streq_ptr(str, ""));
str = mfree(str);
- assert_se(strextend_with_separator(&str, "xyz", "a", "bb", "ccc", NULL));
+ assert_se(strextend_with_separator(&str, "xyz", "a", "bb", "ccc"));
assert_se(streq_ptr(str, "axyzbbxyzccc"));
str = mfree(str);
- assert_se(strextend_with_separator(&str, ",", "start", "", "1", "234", NULL));
+ assert_se(strextend_with_separator(&str, ",", "start", "", "1", "234"));
assert_se(streq_ptr(str, "start,,1,234"));
- assert_se(strextend_with_separator(&str, ";", "more", "5", "678", NULL));
+ assert_se(strextend_with_separator(&str, ";", "more", "5", "678"));
assert_se(streq_ptr(str, "start,,1,234;more;5;678"));
}