summaryrefslogtreecommitdiff
path: root/test_utils/test_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'test_utils/test_main.c')
-rw-r--r--test_utils/test_main.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/test_utils/test_main.c b/test_utils/test_main.c
index a733c9e5..81b5002f 100644
--- a/test_utils/test_main.c
+++ b/test_utils/test_main.c
@@ -3871,10 +3871,6 @@ main(int argc, char **argv)
#if defined(HAVE_LOCALTIME_R) || defined(HAVE__LOCALTIME64_S)
struct tm tmbuf;
#endif
-#if defined(HAVE__LOCALTIME64_S)
- errno_t terr;
- __time64_t tmptime;
-#endif
char *refdir_alloc = NULL;
const char *progname;
char **saved_argv;
@@ -4110,12 +4106,7 @@ main(int argc, char **argv)
now = time(NULL);
for (i = 0; ; i++) {
#if defined(HAVE__LOCALTIME64_S)
- tmptime = now;
- terr = _localtime64_s(&tmbuf, &tmptime);
- if (terr)
- tmptr = NULL;
- else
- tmptr = &tmbuf;
+ tmptr = _localtime64_s(&tmbuf, &now) ? NULL : &tmbuf;
#elif defined(HAVE_LOCALTIME_R)
tmptr = localtime_r(&now, &tmbuf);
#else