summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'src/test')
-rw-r--r--src/test/test-copy.c12
-rw-r--r--src/test/test-date.c4
-rw-r--r--src/test/test-fileio.c2
-rw-r--r--src/test/test-namespace.c8
-rw-r--r--src/test/test-path.c2
-rw-r--r--src/test/test-replace-var.c2
6 files changed, 15 insertions, 15 deletions
diff --git a/src/test/test-copy.c b/src/test/test-copy.c
index ed1ea51dbd..91d2a0bcd4 100644
--- a/src/test/test-copy.c
+++ b/src/test/test-copy.c
@@ -106,7 +106,7 @@ static void test_copy_tree(void) {
STRV_FOREACH(p, files) {
_cleanup_free_ char *f;
- assert_se(f = strappend(original_dir, *p));
+ assert_se((f = strappend(original_dir, *p)));
assert_se(mkdir_parents(f, 0755) >= 0);
assert_se(write_string_file(f, "file", WRITE_STRING_FILE_CREATE) == 0);
@@ -115,8 +115,8 @@ static void test_copy_tree(void) {
STRV_FOREACH_PAIR(link, p, links) {
_cleanup_free_ char *f, *l;
- assert_se(f = strappend(original_dir, *p));
- assert_se(l = strappend(original_dir, *link));
+ assert_se((f = strappend(original_dir, *p)));
+ assert_se((l = strappend(original_dir, *link)));
assert_se(mkdir_parents(l, 0755) >= 0);
assert_se(symlink(f, l) == 0);
@@ -131,7 +131,7 @@ static void test_copy_tree(void) {
_cleanup_free_ char *buf = NULL, *f;
size_t sz = 0;
- assert_se(f = strappend(copy_dir, *p));
+ assert_se((f = strappend(copy_dir, *p)));
assert_se(access(f, F_OK) == 0);
assert_se(read_full_file(f, &buf, &sz) == 0);
@@ -141,8 +141,8 @@ static void test_copy_tree(void) {
STRV_FOREACH_PAIR(link, p, links) {
_cleanup_free_ char *target = NULL, *f, *l;
- assert_se(f = strjoin(original_dir, *p, NULL));
- assert_se(l = strjoin(copy_dir, *link, NULL));
+ assert_se((f = strjoin(original_dir, *p)));
+ assert_se((l = strjoin(copy_dir, *link)));
assert_se(readlink_and_canonicalize(l, &target) == 0);
assert_se(path_equal(f, target));
diff --git a/src/test/test-date.c b/src/test/test-date.c
index 7f497bb7d5..a8d3f1e083 100644
--- a/src/test/test-date.c
+++ b/src/test/test-date.c
@@ -60,7 +60,7 @@ static void test_one(const char *p) {
_cleanup_free_ char *with_utc;
log_info("Test: %s", p);
- with_utc = strjoin(p, " UTC", NULL);
+ with_utc = strjoin(p, " UTC");
test_should_pass(p);
test_should_pass(with_utc);
}
@@ -69,7 +69,7 @@ static void test_one_noutc(const char *p) {
_cleanup_free_ char *with_utc;
log_info("Test: %s", p);
- with_utc = strjoin(p, " UTC", NULL);
+ with_utc = strjoin(p, " UTC");
test_should_pass(p);
test_should_fail(with_utc);
}
diff --git a/src/test/test-fileio.c b/src/test/test-fileio.c
index 92663ef66f..56316904a3 100644
--- a/src/test/test-fileio.c
+++ b/src/test/test-fileio.c
@@ -367,7 +367,7 @@ static void test_write_string_file_verify(void) {
int r;
assert_se(read_one_line_file("/proc/cmdline", &buf) >= 0);
- assert_se((buf2 = strjoin(buf, "\n", NULL)));
+ assert_se((buf2 = strjoin(buf, "\n")));
r = write_string_file("/proc/cmdline", buf, 0);
assert_se(r == -EACCES || r == -EIO);
diff --git a/src/test/test-namespace.c b/src/test/test-namespace.c
index ff9f35cecd..de7be1f9cc 100644
--- a/src/test/test-namespace.c
+++ b/src/test/test-namespace.c
@@ -132,14 +132,14 @@ int main(int argc, char *argv[]) {
assert_se(sd_id128_get_boot(&bid) >= 0);
sd_id128_to_string(bid, boot_id);
- x = strjoin("/tmp/systemd-private-", boot_id, "-abcd.service-", NULL);
- y = strjoin("/var/tmp/systemd-private-", boot_id, "-abcd.service-", NULL);
+ x = strjoin("/tmp/systemd-private-", boot_id, "-abcd.service-");
+ y = strjoin("/var/tmp/systemd-private-", boot_id, "-abcd.service-");
assert_se(x && y);
test_tmpdir("abcd.service", x, y);
- z = strjoin("/tmp/systemd-private-", boot_id, "-sys-devices-pci0000:00-0000:00:1a.0-usb3-3\\x2d1-3\\x2d1:1.0-bluetooth-hci0.device-", NULL);
- zz = strjoin("/var/tmp/systemd-private-", boot_id, "-sys-devices-pci0000:00-0000:00:1a.0-usb3-3\\x2d1-3\\x2d1:1.0-bluetooth-hci0.device-", NULL);
+ z = strjoin("/tmp/systemd-private-", boot_id, "-sys-devices-pci0000:00-0000:00:1a.0-usb3-3\\x2d1-3\\x2d1:1.0-bluetooth-hci0.device-");
+ zz = strjoin("/var/tmp/systemd-private-", boot_id, "-sys-devices-pci0000:00-0000:00:1a.0-usb3-3\\x2d1-3\\x2d1:1.0-bluetooth-hci0.device-");
assert_se(z && zz);
diff --git a/src/test/test-path.c b/src/test/test-path.c
index 4d3f0e9948..5e99d478ee 100644
--- a/src/test/test-path.c
+++ b/src/test/test-path.c
@@ -56,7 +56,7 @@ static int setup_test(Manager **m) {
STRV_FOREACH(test_path, tests_path) {
_cleanup_free_ char *p = NULL;
- p = strjoin("/tmp/test-path_", *test_path, NULL);
+ p = strjoin("/tmp/test-path_", *test_path);
assert_se(p);
(void) rm_rf(p, REMOVE_ROOT|REMOVE_PHYSICAL);
diff --git a/src/test/test-replace-var.c b/src/test/test-replace-var.c
index 297effce79..60e05d04c9 100644
--- a/src/test/test-replace-var.c
+++ b/src/test/test-replace-var.c
@@ -25,7 +25,7 @@
#include "util.h"
static char *lookup(const char *variable, void *userdata) {
- return strjoin("<<<", variable, ">>>", NULL);
+ return strjoin("<<<", variable, ">>>");
}
int main(int argc, char *argv[]) {