4
0
mirror of git://sourceware.org/git/newlib-cygwin.git synced 2025-01-19 04:49:25 +08:00

Cygwin: timerfd: Handle gettime error in settime

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
Corinna Vinschen 2019-01-21 00:14:51 +01:00
parent 02de9ac61e
commit a3268ac392

View File

@ -590,8 +590,8 @@ timerfd_tracker::settime (int flags, const struct itimerspec *new_value,
ret = -EBADF;
__leave;
}
if (old_value)
gettime (old_value);
if (old_value && (ret = gettime (old_value)) < 0)
__leave;
if (new_value->it_value.tv_sec == 0 && new_value->it_value.tv_nsec == 0)
ret = disarm_timer ();
else