From 80e2fe427c1f9f6876e1251ea2c7cf1d9003590c Mon Sep 17 00:00:00 2001 From: Hui Li Date: Mon, 29 Jun 2020 11:12:22 +0800 Subject: [PATCH] [coverity scan] --- src/util/src/ttime.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/src/ttime.c b/src/util/src/ttime.c index 96e0eaa214..7fb9738ec7 100644 --- a/src/util/src/ttime.c +++ b/src/util/src/ttime.c @@ -60,7 +60,7 @@ int64_t user_mktime64(const unsigned int year0, const unsigned int mon0, // year*365 - 719499)*24 + hour)*60 + min)*60 + sec); int64_t res; res = 367*((int64_t)mon)/12; - res += year/4 - year/100 + year/400 + day + year*365 - 719499; + res += year/4 - year/100 + year/400 + day + ((int64_t)year)*365 - 719499; res = res*24; res = ((res + hour) * 60 + min) * 60 + sec;