diff options
author | Darren Tucker <dtucker@dtucker.net> | 2021-11-18 23:44:07 +1100 |
---|---|---|
committer | Darren Tucker <dtucker@dtucker.net> | 2021-11-18 23:44:07 +1100 |
commit | d902d728dfd81622454260e23bc09d5e5a9a795e (patch) | |
tree | 0cdfa73bbf84a7d4c3f22e3bf3843dd2a97d549f /openbsd-compat/bsd-poll.c | |
parent | 21dd5a9a3fb35e8299a1fbcf8d506f1f6b752b85 (diff) |
Correct calculation of tv_nsec in poll().
Diffstat (limited to 'openbsd-compat/bsd-poll.c')
-rw-r--r-- | openbsd-compat/bsd-poll.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; } |