mirror of git://anongit.mindrot.org/openssh.git
Correct calculation of tv_nsec in poll().
This commit is contained in:
parent
21dd5a9a3f
commit
d902d728df
|
@ -120,7 +120,7 @@ poll(struct pollfd *fds, nfds_t nfds, int timeout)
|
||||||
/* poll timeout is msec, ppoll is timespec (sec + nsec) */
|
/* poll timeout is msec, ppoll is timespec (sec + nsec) */
|
||||||
if (timeout >= 0) {
|
if (timeout >= 0) {
|
||||||
ts.tv_sec = timeout / 1000;
|
ts.tv_sec = timeout / 1000;
|
||||||
ts.tv_nsec = (timeout % 1000000) * 1000000;
|
ts.tv_nsec = (timeout % 1000) * 1000000;
|
||||||
tsp = &ts;
|
tsp = &ts;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue