Avoid casting time_t to int

As time_t may not fit int, cast -1 to time_t instead.
This commit is contained in:
SHIRAKATA Kentaro
2023-01-23 16:34:24 +09:00
parent c5aad9fe56
commit b8ec2dfc96

View File

@@ -1157,7 +1157,7 @@ time_from_yyyymmddhhmmss(char *buf)
t.tm_sec = atoi(s);
timeresult = mktime(&t);
}
if ((int) timeresult == -1)
if (timeresult == (time_t) -1)
debugpline1("time_from_yyyymmddhhmmss(%s) would have returned -1",
buf ? buf : "");
else