diff options
Diffstat (limited to 'libarchive/test/test_write_format_zip_file.c')
-rw-r--r-- | libarchive/test/test_write_format_zip_file.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/libarchive/test/test_write_format_zip_file.c b/libarchive/test/test_write_format_zip_file.c index ff3c13dc..afd0eb6e 100644 --- a/libarchive/test/test_write_format_zip_file.c +++ b/libarchive/test/test_write_format_zip_file.c @@ -77,10 +77,6 @@ DEFINE_TEST(test_write_format_zip_file) #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 size_t used, buffsize = 1000000; unsigned long crc; int file_perm = 00644; @@ -99,12 +95,7 @@ DEFINE_TEST(test_write_format_zip_file) #endif #if defined(HAVE__LOCALTIME64_S) - tmptime = t; - terr = _localtime64_s(&tmbuf, &tmptime); - if (terr) - tm = NULL; - else - tm = &tmbuf; + tm = _localtime64_s(&tmbuf, &t) ? NULL : &tmbuf; #elif defined(HAVE_LOCALTIME_R) tm = localtime_r(&t, &tmbuf); #else |