basic/group-util: optimize alloca use

Follow-up for 0fa7b50053.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2021-03-11 14:43:16 +01:00
parent bcef0f33cc
commit e4645ca599
2 changed files with 11 additions and 7 deletions
+6
View File
@@ -345,6 +345,12 @@ static void test_strjoina(void) {
actual = strjoina("foo", NULL, "bar");
assert_se(streq(actual, "foo"));
actual = strjoina("/sys/fs/cgroup/", "dn", "/a/b/c", "/cgroup.procs");
assert_se(streq(actual, "/sys/fs/cgroup/dn/a/b/c/cgroup.procs"));
actual = strjoina("/sys/fs/cgroup/", "dn", NULL, NULL);
assert_se(streq(actual, "/sys/fs/cgroup/dn"));
}
static void test_strjoin(void) {