summaryrefslogtreecommitdiff
path: root/cpio/cpio.c
diff options
context:
space:
mode:
Diffstat (limited to 'cpio/cpio.c')
-rw-r--r--cpio/cpio.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/cpio/cpio.c b/cpio/cpio.c
index 7ed6a823..de0144fa 100644
--- a/cpio/cpio.c
+++ b/cpio/cpio.c
@@ -1156,10 +1156,6 @@ list_item_verbose(struct cpio *cpio, struct archive_entry *entry)
#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
if (!now)
time(&now);
@@ -1208,12 +1204,7 @@ list_item_verbose(struct cpio *cpio, struct archive_entry *entry)
fmt = cpio->day_first ? "%e %b %H:%M" : "%b %e %H:%M";
#endif
#if defined(HAVE__LOCALTIME64_S)
- tmptime = mtime;
- terr = _localtime64_s(&tmbuf, &tmptime);
- if (terr)
- ltime = NULL;
- else
- ltime = &tmbuf;
+ ltime = _localtime64_s(&tmbuf, &mtime) ? NULL : &tmbuf;
#elif defined(HAVE_LOCALTIME_R)
ltime = localtime_r(&mtime, &tmbuf);
#else