summaryrefslogtreecommitdiff
path: root/cpio/test/test_option_t.c
diff options
context:
space:
mode:
Diffstat (limited to 'cpio/test/test_option_t.c')
-rw-r--r--cpio/test/test_option_t.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/cpio/test/test_option_t.c b/cpio/test/test_option_t.c
index 3d27b72d..52bcff52 100644
--- a/cpio/test/test_option_t.c
+++ b/cpio/test/test_option_t.c
@@ -40,10 +40,6 @@ DEFINE_TEST(test_option_t)
#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
/* List reference archive, make sure the TOC is correct. */
extract_reference_file("test_option_t.cpio");
@@ -96,12 +92,7 @@ DEFINE_TEST(test_option_t)
setlocale(LC_ALL, "");
#endif
#if defined(HAVE__LOCALTIME64_S)
- tmptime = mtime;
- terr = _localtime64_s(&tmbuf, &tmptime);
- if (terr)
- tmptr = NULL;
- else
- tmptr = &tmbuf;
+ tmptr = _localtime64_s(&tmbuf, &mtime) ? NULL : &tmbuf;
#elif defined(HAVE_LOCALTIME_R)
tmptr = localtime_r(&mtime, &tmbuf);
#else