mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-02-21 00:07:36 +08:00
Cygwin: POSIX timers: Fix timer values returned for unarmed timer
The "optimized" condition to recognize an unarmed timer was plain wrong. Replace it by checking the stored it_value against 0. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
parent
f3be186911
commit
aeaa051f3b
@ -245,7 +245,7 @@ timer_tracker::gettime (itimerspec *curr_value, bool lock)
|
||||
return -EINVAL;
|
||||
}
|
||||
}
|
||||
if (!cancel_evt)
|
||||
if (!time_spec.it_value.tv_sec && !time_spec.it_value.tv_nsec)
|
||||
memset (curr_value, 0, sizeof (*curr_value));
|
||||
else
|
||||
{
|
||||
|
@ -18,3 +18,6 @@ Bug Fixes
|
||||
|
||||
- Fix and speed up evaluation of group membership in seteuid.
|
||||
Addresses: Local testing.
|
||||
|
||||
- Fix getitimer/timer_gettime values returned for unarmed timer.
|
||||
Addresses: https://cygwin.com/ml/cygwin/2019-02/msg00395.html
|
||||
|
Loading…
x
Reference in New Issue
Block a user