From: Zbigniew Jędrzejewski-Szmek Date: Mon, 22 Mar 2021 10:29:35 +0000 (+0100) Subject: test-calendarspec: do not convert timezone "" to ":" X-Git-Tag: v248-2~36^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=47b0b65766229a18921a3ce831ef708ef408a34c;p=thirdparty%2Fsystemd.git test-calendarspec: do not convert timezone "" to ":" I *think* it doesn't actually make any difference, because ":" will be ignored. 437f48a471f51ac9dd2697ee3b848a71b4f101df added prefixing with ":", but didn't take into account the fact that we also use "" with a different meaning than NULL here. But let's restore the original behaviour of specifying the empty string. --- diff --git a/src/test/test-calendarspec.c b/src/test/test-calendarspec.c index 152ce879f8a..c62e6860cf9 100644 --- a/src/test/test-calendarspec.c +++ b/src/test/test-calendarspec.c @@ -44,7 +44,7 @@ static void _test_next(int line, const char *input, const char *new_tz, usec_t a if (old_tz) old_tz = strdupa(old_tz); - if (new_tz) + if (!isempty(new_tz)) new_tz = strjoina(":", new_tz); assert_se(set_unset_env("TZ", new_tz, true) == 0);