mirror of
https://frontier.innolan.net/rainlance/amiga-tz.git
synced 2025-12-06 16:03:57 +00:00
more overflow work
SCCS-file: zic.c SCCS-SID: 7.112
This commit is contained in:
committed by
Paul Eggert
parent
ce27b2ae9a
commit
c1ff4ff5c1
9
zic.c
9
zic.c
@ -2139,12 +2139,11 @@ register const int wantedy;
|
||||
}
|
||||
if (dayoff < 0 && !TYPE_SIGNED(time_t))
|
||||
return min_time;
|
||||
if (dayoff < min_time / SECSPERDAY)
|
||||
return min_time;
|
||||
if (dayoff > max_time / SECSPERDAY)
|
||||
return max_time;
|
||||
t = (time_t) dayoff * SECSPERDAY;
|
||||
/*
|
||||
** Cheap overflow check.
|
||||
*/
|
||||
if (t / SECSPERDAY != dayoff)
|
||||
return (dayoff > 0) ? max_time : min_time;
|
||||
return tadd(t, rp->r_tod);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user