Skip to content

Commit

Permalink
Update.
Browse files Browse the repository at this point in the history
	* timezone/zic.c (rpytime): Replace cheap overflow check with a
	functioning one.
  • Loading branch information
Ulrich Drepper committed Jul 25, 2003
1 parent 99fe3b0 commit 02ade8d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
3 changes: 3 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
2003-07-24 Ulrich Drepper <[email protected]>

* timezone/zic.c (rpytime): Replace cheap overflow check with a
functioning one.

* include/link.h (struct link_map): Add l_tls_firstbyte_offset field.
* sysdeps/generic/dl-tls.c [TLS_TCB_AT_TP] (_dl_determine_tlsoffset):
Fix calculation of offsets to take misalignment of first byte in
Expand Down
11 changes: 6 additions & 5 deletions timezone/zic.c
Original file line number Diff line number Diff line change
Expand Up @@ -2152,12 +2152,13 @@ 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;
if (t > 0 && max_time - t < rp->r_tod)
return max_time;
return tadd(t, rp->r_tod);
}

Expand Down

0 comments on commit 02ade8d

Please sign in to comment.