public inbox for cygwin-cvs@sourceware.org
help / color / mirror / Atom feed
* [newlib-cygwin] Cygwin: timerfd: Handle gettime error in settime
@ 2019-01-20 23:15 Corinna Vinschen
0 siblings, 0 replies; only message in thread
From: Corinna Vinschen @ 2019-01-20 23:15 UTC (permalink / raw)
To: cygwin-cvs
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=a3268ac392241830cf6c91abe663f252c407cf8c
commit a3268ac392241830cf6c91abe663f252c407cf8c
Author: Corinna Vinschen <corinna@vinschen.de>
Date: Mon Jan 21 00:14:51 2019 +0100
Cygwin: timerfd: Handle gettime error in settime
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diff:
---
winsup/cygwin/timerfd.cc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/winsup/cygwin/timerfd.cc b/winsup/cygwin/timerfd.cc
index 4f04efd..e5c17fb 100644
--- a/winsup/cygwin/timerfd.cc
+++ b/winsup/cygwin/timerfd.cc
@@ -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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2019-01-20 23:15 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-20 23:15 [newlib-cygwin] Cygwin: timerfd: Handle gettime error in settime Corinna Vinschen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).