From a214d562abf578423524b98ddc66a55b0a5dc9f6 Mon Sep 17 00:00:00 2001 From: Hui Li Date: Tue, 23 Jun 2020 09:57:06 +0800 Subject: [PATCH] [modify for 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 02d72dd1f4..5feda312b1 100644 --- a/src/util/src/ttime.c +++ b/src/util/src/ttime.c @@ -56,7 +56,7 @@ int64_t user_mktime64(const unsigned int year0, const unsigned int mon0, year -= 1; } - int64_t res = (((((int64_t) (year/4 - year/100 + year/400 + 367*mon/12 + day) + + int64_t res = (((((int64_t) (year/4 - year/100 + year/400 + (int64_t)(367*mon)/12 + day) + year*365 - 719499)*24 + hour)*60 + min)*60 + sec); return (res + timezone);