diff options
author | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2014-10-30 13:43:29 +0000 |
---|---|---|
committer | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2014-10-30 13:43:29 +0000 |
commit | b67808b55aeda6a775d8cf99d4d98f65bab682fb (patch) | |
tree | dc01202ce4d5b18feb557934d7762dc05d123a36 /lib | |
parent | e4b08b14b91d398693871c7a44fa6160dd7726b7 (diff) |
The fdsz and n_events variables contain unsigned values that are
derived from size_t and passed to functions as size_t parameters.
Change them from int to size_t to avoid compiler warnings.
OK doug@ nicm@
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libevent/select.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/libevent/select.c b/lib/libevent/select.c index 0f373bc4e2a..ee95085f35b 100644 --- a/lib/libevent/select.c +++ b/lib/libevent/select.c @@ -1,4 +1,4 @@ -/* $OpenBSD: select.c,v 1.23 2014/10/29 22:47:29 bluhm Exp $ */ +/* $OpenBSD: select.c,v 1.24 2014/10/30 13:43:28 bluhm Exp $ */ /* * Copyright 2000-2002 Niels Provos <provos@citi.umich.edu> @@ -49,7 +49,7 @@ struct selectop { int event_fds; /* Highest fd in fd set */ - int event_fdsz; + size_t event_fdsz; fd_set *event_readset_in; fd_set *event_writeset_in; fd_set *event_readset_out; @@ -74,7 +74,7 @@ const struct eventop selectops = { 0 }; -static int select_resize(struct selectop *sop, int fdsz); +static int select_resize(struct selectop *sop, size_t fdsz); static void * select_init(struct event_base *base) @@ -184,9 +184,9 @@ select_dispatch(struct event_base *base, void *arg, struct timeval *tv) static int -select_resize(struct selectop *sop, int fdsz) +select_resize(struct selectop *sop, size_t fdsz) { - int n_events, n_events_old; + size_t n_events, n_events_old; fd_set *readset_in = NULL; fd_set *writeset_in = NULL; @@ -256,7 +256,7 @@ select_add(void *arg, struct event *ev) * of the fd_sets for select(2) */ if (sop->event_fds < ev->ev_fd) { - int fdsz = sop->event_fdsz; + size_t fdsz = sop->event_fdsz; if (fdsz < sizeof(fd_mask)) fdsz = sizeof(fd_mask); |