diff options
author | Rosen Penev | 2020-12-21 20:52:51 -0800 |
---|---|---|
committer | Nikias Bassen | 2021-06-22 01:27:02 +0200 |
commit | 526c10436caa894fb6139f4e6c0f73eebfa858ea (patch) | |
tree | ddca872bbdb55972289307599b19d43b494d4fc7 | |
parent | d2b9cc8bef501c5a8dc4dc7206d302585906546a (diff) | |
download | libplist-526c10436caa894fb6139f4e6c0f73eebfa858ea.tar.gz libplist-526c10436caa894fb6139f4e6c0f73eebfa858ea.tar.bz2 |
[clang-tidy] Fix bad widening casts
Found with bugprone-misplaced-widening-cast
Signed-off-by: Rosen Penev <rosenp@gmail.com>
-rw-r--r-- | src/time64.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/time64.c b/src/time64.c index 53932de..07639df 100644 --- a/src/time64.c +++ b/src/time64.c @@ -531,7 +531,7 @@ Time64_T mktime64(struct TM *input_date) { /* Correct the user's possibly out of bound input date */ copy_tm_to_TM64(&safe_date, input_date); - timev += seconds_between_years(year, (Year)(safe_date.tm_year + 1900)); + timev += seconds_between_years(year, (Year)(safe_date.tm_year) + 1900); return timev; } @@ -706,7 +706,7 @@ struct TM *localtime64_r (const Time64_T *timev, struct TM *local_tm) ) { TIME64_TRACE1("Mapping tm_year %lld to safe_year\n", (Year)gm_tm.tm_year); - gm_tm.tm_year = safe_year((Year)(gm_tm.tm_year + 1900)) - 1900; + gm_tm.tm_year = safe_year((Year)(gm_tm.tm_year) + 1900) - 1900; } safe_time = (time_t)timegm64(&gm_tm); |