[openssh-commits] [openssh] 01/01: Correct calculation of tv_nsec in poll().

git+noreply at mindrot.org git+noreply at mindrot.org
Thu Nov 18 23:44:47 AEDT 2021


This is an automated email from the git hooks/post-receive script.

dtucker pushed a commit to branch master
in repository openssh.

commit d902d728dfd81622454260e23bc09d5e5a9a795e
Author: Darren Tucker <dtucker at dtucker.net>
Date:   Thu Nov 18 23:44:07 2021 +1100

    Correct calculation of tv_nsec in poll().
---
 openbsd-compat/bsd-poll.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/openbsd-compat/bsd-poll.c b/openbsd-compat/bsd-poll.c
index f1b2f119..b661c030 100644
--- a/openbsd-compat/bsd-poll.c
+++ b/openbsd-compat/bsd-poll.c
@@ -120,7 +120,7 @@ poll(struct pollfd *fds, nfds_t nfds, int timeout)
 	/* poll timeout is msec, ppoll is timespec (sec + nsec) */
 	if (timeout >= 0) {
 		ts.tv_sec = timeout / 1000;
-		ts.tv_nsec = (timeout % 1000000) * 1000000;
+		ts.tv_nsec = (timeout % 1000) * 1000000;
 		tsp = &ts;
 	}
 

-- 
To stop receiving notification emails like this one, please contact
djm at mindrot.org.


More information about the openssh-commits mailing list