further cleanup _localtime64_s (#1824)
These were missing from 2d32907343
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
1 parent
1f35c466aa
commit
2e9bcba706
7 files changed
+7
-70
No files matched your search
+1
-10
@@ -3870,10 +3870,6 @@ main(int argc, char **argv)
|
||||
struct tm *tmptr;
|
||||
#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
|
||||
char *refdir_alloc = NULL;
|
||||
const char *progname;
|
||||
@@ -4110,12 +4106,7 @@ main(int argc, char **argv)
|
||||
now = time(NULL);
|
||||
for (i = 0; ; i++) {
|
||||
#if defined(HAVE__LOCALTIME64_S)
|
||||
tmptime = now;
|
||||
terr = _localtime64_s(&tmbuf, &tmptime);
|
||||
if (terr)
|
||||
tmptr = NULL;
|
||||
else
|
||||
tmptr = &tmbuf;
|
||||
tmptr = _localtime64_s(&tmbuf, &now) ? NULL : &tmbuf;
|
||||
#elif defined(HAVE_LOCALTIME_R)
|
||||
tmptr = localtime_r(&now, &tmbuf);
|
||||
#else
|
||||
|
||||
Reference in new issue
Block a user