Module Name:    src
Committed By:   kre
Date:           Thu May  5 02:12:21 UTC 2016

Modified Files:
        src/tests/lib/libutil: t_parsedate.c

Log Message:
Make the 9 months ago test, when reverting from late November to the
end of Feburary just a little less bogus (stupid cut & paste error).


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/tests/lib/libutil/t_parsedate.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/lib/libutil/t_parsedate.c
diff -u src/tests/lib/libutil/t_parsedate.c:1.23 src/tests/lib/libutil/t_parsedate.c:1.24
--- src/tests/lib/libutil/t_parsedate.c:1.23	Wed May  4 18:36:46 2016
+++ src/tests/lib/libutil/t_parsedate.c	Thu May  5 02:12:21 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: t_parsedate.c,v 1.23 2016/05/04 18:36:46 gson Exp $ */
+/* $NetBSD: t_parsedate.c,v 1.24 2016/05/05 02:12:21 kre Exp $ */
 /*-
  * Copyright (c) 2010, 2015 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -29,7 +29,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: t_parsedate.c,v 1.23 2016/05/04 18:36:46 gson Exp $");
+__RCSID("$NetBSD: t_parsedate.c,v 1.24 2016/05/05 02:12:21 kre Exp $");
 
 #include <atf-c.h>
 #include <errno.h>
@@ -249,7 +249,7 @@ ATF_TC_BODY(relative, tc)
 	q = mktime(&tm);						\
 	ATF_CHECK_EQ_MSG(p, q,						\
 	    "From %jd (%24.24s) using \"%s\", obtained %jd (%24.24s); expected %jd (%24.24s)", \
-	    now, ctime_r(&now, nb),					\
+	    (uintmax_t)now, ctime_r(&now, nb),				\
 	    s, (uintmax_t)p, ctime_r(&p, pb), (uintmax_t)q, 		\
 	    ctime_r(&q, qb));						\
     } while (/*CONSTCOND*/0)
@@ -375,7 +375,7 @@ ATF_TC_BODY(relative, tc)
 		ATF_CHECK(localtime_r(&now, &tm) != NULL);
 		tm.tm_mon -= 9;
 		if (tm.tm_mon == 1 && tm.tm_mday > 28 + isleap(tm.tm_year))
-			tm.tm_mday = tm.tm_mday > 28 + isleap(tm.tm_year);
+			tm.tm_mday = 28 + isleap(tm.tm_year);
 		else if ((tm.tm_mon == -9 || tm.tm_mon == -7 ||
 		    tm.tm_mon == -2) && tm.tm_mday == 31)
 			tm.tm_mday = 30;

Reply via email to