summaryrefslogtreecommitdiff
path: root/libarchive/test/test_write_format_zip_file_zip64.c
diff options
context:
space:
mode:
authorRosen Penev <rosenp@gmail.com>2022-12-20 04:48:42 -0800
committerGitHub <noreply@github.com>2022-12-20 13:48:42 +0100
commit2d329073435d36065ce30bfd29428f6a45e41016 (patch)
tree66cf347dc278eb7a86ac02dfabb8858d8fd69538 /libarchive/test/test_write_format_zip_file_zip64.c
parent3da2fb7ee2d929bc8f02bcf3d42def768667c939 (diff)
downloadlibarchive-2d329073435d36065ce30bfd29428f6a45e41016.tar.gz
cleanup _localtime64_s (#1820)
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Diffstat (limited to 'libarchive/test/test_write_format_zip_file_zip64.c')
-rw-r--r--libarchive/test/test_write_format_zip_file_zip64.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libarchive/test/test_write_format_zip_file_zip64.c b/libarchive/test/test_write_format_zip_file_zip64.c
index c4161bc3..8e3b12e1 100644
--- a/libarchive/test/test_write_format_zip_file_zip64.c
+++ b/libarchive/test/test_write_format_zip_file_zip64.c
@@ -99,15 +99,15 @@ DEFINE_TEST(test_write_format_zip_file_zip64)
zip_compression = 0;
#endif
-#if defined(HAVE_LOCALTIME_R)
- tm = localtime_r(&t, &tmbuf);
-#elif defined(HAVE__LOCALTIME64_S)
+#if defined(HAVE__LOCALTIME64_S)
tmptime = t;
terr = _localtime64_s(&tmbuf, &tmptime);
if (terr)
tm = NULL;
else
tm = &tmbuf;
+#elif defined(HAVE_LOCALTIME_R)
+ tm = localtime_r(&t, &tmbuf);
#else
tm = localtime(&t);
#endif