mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-30 22:43:12 +03:00
Define in_int32_t_range to check if the 64 bit time_t syscall should be used
Currently glibc uses in_time_t_range to detects time_t overflow, and if it occurs fallbacks to 64 bit syscall version. The function name is confusing because internally time_t might be either 32 bits or 64 bits (depending on __TIMESIZE). This patch refactors the in_time_t_range by replacing it with in_int32_t_range for the case to check if the 64 bit time_t syscall should be used. The in_time_t range is used to detect overflow of the syscall return value. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
This commit is contained in:
committed by
Adhemerval Zanella
parent
94628de778
commit
a9acb7b39e
@ -32,8 +32,8 @@ __setitimer64 (__itimer_which_t which,
|
||||
#else
|
||||
struct __itimerval32 new_value_32;
|
||||
|
||||
if (! in_time_t_range (new_value->it_interval.tv_sec)
|
||||
|| ! in_time_t_range (new_value->it_value.tv_sec))
|
||||
if (! in_int32_t_range (new_value->it_interval.tv_sec)
|
||||
|| ! in_int32_t_range (new_value->it_value.tv_sec))
|
||||
{
|
||||
__set_errno (EOVERFLOW);
|
||||
return -1;
|
||||
|
Reference in New Issue
Block a user