diff options
author | Rosen Penev <rosenp@gmail.com> | 2022-12-28 14:05:16 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-28 23:05:16 +0100 |
commit | 2e9bcba70685383426ad42c8856c50ce3214ae24 (patch) | |
tree | 7c9e8e2499110a20559cddadc20f06424c2032f9 /tar | |
parent | 1f35c466aaa9444335a1b854b0b7223b0d2346c2 (diff) | |
download | libarchive-2e9bcba70685383426ad42c8856c50ce3214ae24.tar.gz |
further cleanup _localtime64_s (#1824)
These were missing from 2d329073435d36065ce30bfd29428f6a45e41016
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Diffstat (limited to 'tar')
-rw-r--r-- | tar/util.c | 11 |
1 files changed, 1 insertions, 10 deletions
@@ -671,10 +671,6 @@ list_item_verbose(struct bsdtar *bsdtar, FILE *out, 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 /* * We avoid collecting the entire list in memory at once by @@ -747,12 +743,7 @@ list_item_verbose(struct bsdtar *bsdtar, FILE *out, struct archive_entry *entry) else fmt = bsdtar->day_first ? DAY_FMT " %b %H:%M" : "%b " DAY_FMT " %H:%M"; #if defined(HAVE__LOCALTIME64_S) - tmptime = tim; - terr = _localtime64_s(&tmbuf, &tmptime); - if (terr) - ltime = NULL; - else - ltime = &tmbuf; + ltime = _localtime64_s(&tmbuf, &tim) ? NULL : &tmbuf; #elif defined(HAVE_LOCALTIME_R) ltime = localtime_r(&tim, &tmbuf); #else |