bpo-34672: Don't pass NULL to gmtime_r. (GH-9312)

This commit is contained in:
Benjamin Peterson 2018-09-14 10:39:13 -07:00 committed by GitHub
parent 271818fe27
commit b93062b7fb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -1764,7 +1764,8 @@ PyInit_time(void)
#if defined(__linux__) && !defined(__GLIBC__)
struct tm tm;
if (gmtime_r(0, &tm) != NULL)
const time_t zero = 0;
if (gmtime_r(&zero, &tm) != NULL)
utc_string = tm.tm_zone;
#endif