1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-01-12 09:17:44 +03:00

test-load-fragment: don't print NULLs

This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2022-06-07 12:22:29 +02:00
parent 817d19402f
commit e0d537950b

View File

@ -70,10 +70,10 @@ static void check_execcommand(ExecCommand *c,
assert_se(c);
log_info("expect: \"%s\" [\"%s\" \"%s\" \"%s\"]",
path, argv0 ?: path, argv1, argv2);
path, argv0 ?: path, strnull(argv1), strnull(argv2));
n = strv_length(c->argv);
log_info("actual: \"%s\" [\"%s\" \"%s\" \"%s\"]",
c->path, c->argv[0], n > 0 ? c->argv[1] : NULL, n > 1 ? c->argv[2] : NULL);
c->path, c->argv[0], n > 0 ? c->argv[1] : "(null)", n > 1 ? c->argv[2] : "(null)");
assert_se(streq(c->path, path));
assert_se(streq(c->argv[0], argv0 ?: path));
if (n > 0)