summaryrefslogtreecommitdiffstats
path: root/lib/libpthread
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>2004-01-19 17:53:38 +0000
committermillert <millert@openbsd.org>2004-01-19 17:53:38 +0000
commit8cb5019de92694d2a3727cd13be986753a3a015b (patch)
tree2f93eba30dc6fd053b4587a8313eb243c52dffcb /lib/libpthread
parentGet rid of a few useless defines, as well as a few duplicated ones; and (diff)
downloadwireguard-openbsd-8cb5019de92694d2a3727cd13be986753a3a015b.tar.xz
wireguard-openbsd-8cb5019de92694d2a3727cd13be986753a3a015b.zip
Fix -Wsign-compare warnings pointed out by kevlo@, ok marc@
Diffstat (limited to 'lib/libpthread')
-rw-r--r--lib/libpthread/uthread/uthread_poll.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/libpthread/uthread/uthread_poll.c b/lib/libpthread/uthread/uthread_poll.c
index a2b42219d41..7dbb9c30ead 100644
--- a/lib/libpthread/uthread/uthread_poll.c
+++ b/lib/libpthread/uthread/uthread_poll.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uthread_poll.c,v 1.9 2004/01/01 08:19:33 brad Exp $ */
+/* $OpenBSD: uthread_poll.c,v 1.10 2004/01/19 17:53:38 millert Exp $ */
/*
* Copyright (c) 1999 Daniel Eischen <eischen@vigrid.com>
* All rights reserved.
@@ -49,14 +49,14 @@ poll(struct pollfd fds[], nfds_t nfds, int timeout)
{
struct pthread *curthread = _get_curthread();
struct timespec ts;
- nfds_t numfds = nfds;
- int i, ret = 0;
+ nfds_t n, numfds = nfds;
+ int ret = 0;
struct pthread_poll_data data;
/* This is a cancellation point: */
_thread_enter_cancellation_point();
- if (numfds > _thread_dtablesize) {
+ if (numfds > (nfds_t)_thread_dtablesize) {
numfds = _thread_dtablesize;
}
/* Check if a timeout was specified: */
@@ -84,8 +84,8 @@ poll(struct pollfd fds[], nfds_t nfds, int timeout)
* Clear revents in case of a timeout which leaves fds
* unchanged:
*/
- for (i = 0; i < numfds; i++) {
- fds[i].revents = 0;
+ for (n = 0; n < numfds; n++) {
+ fds[n].revents = 0;
}
curthread->data.poll_data = &data;