summaryrefslogtreecommitdiff
path: root/thread.c
diff options
context:
space:
mode:
Diffstat (limited to 'thread.c')
-rw-r--r--thread.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/thread.c b/thread.c
index cf7affa424..1614bfe925 100644
--- a/thread.c
+++ b/thread.c
@@ -2759,14 +2759,14 @@ int ppoll(struct pollfd *fds, nfds_t nfds,
timeout_ms = -1;
else {
tmp = ts->tv_sec * 1000;
- tmp2 = tv->tv_nsec / (1000 * 1000);
+ tmp2 = ts->tv_nsec / (1000 * 1000);
if (TIMET_MAX - tmp < tmp2)
timeout_ms = -1;
else
timeout_ms = tmp + tmp2;
}
} else
- timeout = -1;
+ timeout_ms = -1;
return poll(fds, nfds, timeout_ms);
}