From 5617a71e2ed28eb129c8854aa3ae18c98c409c59 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Matthias=20Dieter=20Walln=C3=B6fer?= Date: Mon, 6 Dec 2010 11:28:22 +0100 Subject: [PATCH] Revert "lib/util:tests/time.c - "test_timestring" - fix it on Solaris" MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This reverts commit 654e0102ddb0acaaf45fb55c15818722235fcc9f. This should better be handled by the replace library. Autobuild-User: Matthias Dieter Wallnöfer Autobuild-Date: Mon Dec 6 12:17:31 CET 2010 on sn-devel-104 (cherry picked from commit bd3e5804a41fdfc8a43bebd95c53e4f0ff1d7a10) --- lib/util/tests/time.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/util/tests/time.c b/lib/util/tests/time.c index 2a6e645998c..592f88f88bd 100644 --- a/lib/util/tests/time.c +++ b/lib/util/tests/time.c @@ -64,7 +64,7 @@ static bool test_http_timestring(struct torture_context *tctx) static bool test_timestring(struct torture_context *tctx) { - const char *start = "Thu Jan 1", *start2 = "Thu Jan 01"; + const char *start = "Thu Jan 1"; char *result; /* * Correct test for negative UTC offset. Without the correction, the @@ -77,10 +77,7 @@ static bool test_timestring(struct torture_context *tctx) time_t utc_offset = mktime(&local) - mktime(&gmt); result = timestring(tctx, 42 - (utc_offset < 0 ? utc_offset : 0)); - torture_assert(tctx, - (strncmp(start, result, strlen(start)) == 0) || - (strncmp(start2, result, strlen(start2)) == 0), - result); + torture_assert(tctx, !strncmp(start, result, strlen(start)), result); return true; } -- 2.11.4.GIT