From cedbf6d5f3f70ca911176de87d6e453eeab4b7a1 Mon Sep 17 00:00:00 2001 From: Adhemerval Zanella Date: Thu, 8 Apr 2021 07:39:32 -0300 Subject: linux: always update select timeout (BZ #27706) The timeout should be updated even on failure for time64 support. Checked on i686-linux-gnu. --- sysdeps/unix/sysv/linux/select.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sysdeps/unix/sysv/linux') diff --git a/sysdeps/unix/sysv/linux/select.c b/sysdeps/unix/sysv/linux/select.c index 3b67ff4476..dc16a816ed 100644 --- a/sysdeps/unix/sysv/linux/select.c +++ b/sysdeps/unix/sysv/linux/select.c @@ -107,7 +107,7 @@ __select64 (int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, r = SYSCALL_CANCEL (pselect6, nfds, readfds, writefds, exceptfds, pts32, NULL); # endif - if (r >= 0 && timeout != NULL) + if (timeout != NULL) *timeout = valid_timespec_to_timeval64 (ts32); #endif @@ -128,7 +128,7 @@ __select (int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, ptv64 = &tv64; } int r = __select64 (nfds, readfds, writefds, exceptfds, ptv64); - if (r >= 0 && timeout != NULL) + if (timeout != NULL) /* The remanining timeout will be always less the input TIMEOUT. */ *timeout = valid_timeval64_to_timeval (tv64); return r; -- cgit 1.4.1