X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Ftest%2Ftest-date.c;h=00b569080ccaa04809882b70af82e7e93197c6de;hb=097df453dab149f6b45f1b30510363acd8f11593;hp=0586b78b6d5e4d2a87fc92a04a1cbfb3ea5ee483;hpb=5ba6e0949cef1a5b947dd59665bad1ca5066619d;p=elogind.git diff --git a/src/test/test-date.c b/src/test/test-date.c index 0586b78b6..00b569080 100644 --- a/src/test/test-date.c +++ b/src/test/test-date.c @@ -28,7 +28,8 @@ static void test_one(const char *p) { char buf[FORMAT_TIMESTAMP_MAX], buf_relative[FORMAT_TIMESTAMP_RELATIVE_MAX]; assert_se(parse_timestamp(p, &t) >= 0); - log_info("%s", format_timestamp(buf, sizeof(buf), t)); + format_timestamp(buf, sizeof(buf), t); + log_info("%s", buf); /* Chop off timezone */ *strrchr(buf, ' ') = 0; @@ -36,7 +37,8 @@ static void test_one(const char *p) { assert_se(parse_timestamp(buf, &q) >= 0); assert_se(q == t); - log_info("%s", strna(format_timestamp_relative(buf_relative, sizeof(buf_relative), t))); + format_timestamp_relative(buf_relative, sizeof(buf_relative), t); + log_info("%s", strna(buf_relative)); assert_se(parse_timestamp(buf, &q) >= 0); }