mirror of
https://github.com/morgan9e/systemd
synced 2026-04-14 16:37:19 +09:00
test: use free() instead of mfree()
Since we don't use the returned value anyway.
This commit is contained in:
@@ -375,31 +375,31 @@ TEST(strjoin) {
|
||||
|
||||
actual = strjoin("", "foo", "bar");
|
||||
assert_se(streq(actual, "foobar"));
|
||||
mfree(actual);
|
||||
free(actual);
|
||||
|
||||
actual = strjoin("foo", "bar", "baz");
|
||||
assert_se(streq(actual, "foobarbaz"));
|
||||
mfree(actual);
|
||||
free(actual);
|
||||
|
||||
actual = strjoin("foo", "", "bar", "baz");
|
||||
assert_se(streq(actual, "foobarbaz"));
|
||||
mfree(actual);
|
||||
free(actual);
|
||||
|
||||
actual = strjoin("foo", NULL);
|
||||
assert_se(streq(actual, "foo"));
|
||||
mfree(actual);
|
||||
free(actual);
|
||||
|
||||
actual = strjoin(NULL, NULL);
|
||||
assert_se(streq(actual, ""));
|
||||
mfree(actual);
|
||||
free(actual);
|
||||
|
||||
actual = strjoin(NULL, "foo");
|
||||
assert_se(streq(actual, ""));
|
||||
mfree(actual);
|
||||
free(actual);
|
||||
|
||||
actual = strjoin("foo", NULL, "bar");
|
||||
assert_se(streq(actual, "foo"));
|
||||
mfree(actual);
|
||||
free(actual);
|
||||
}
|
||||
|
||||
TEST(strcmp_ptr) {
|
||||
|
||||
Reference in New Issue
Block a user