summaryrefslogtreecommitdiffhomepage
path: root/src/event/modules/ngx_poll_module.c
diff options
context:
space:
mode:
authorYves Crespin <yves.crespin@e-quartz.fr>2014-08-07 14:56:57 +0200
committerYves Crespin <yves.crespin@e-quartz.fr>2014-08-07 14:56:57 +0200
commit6a58555ca87a916c9c9956bdc600142485a40aab (patch)
treeedec962be801875404cee231fd9b9fcf834c0d78 /src/event/modules/ngx_poll_module.c
parent12300c2a20657fc661206f210b36dea05b48f051 (diff)
downloadnginx-6a58555ca87a916c9c9956bdc600142485a40aab.tar.gz
nginx-6a58555ca87a916c9c9956bdc600142485a40aab.tar.bz2
Events: changed nevents type to unsigned in poll module.
Diffstat (limited to 'src/event/modules/ngx_poll_module.c')
-rw-r--r--src/event/modules/ngx_poll_module.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/event/modules/ngx_poll_module.c b/src/event/modules/ngx_poll_module.c
index 4d4521845..ff3b3fb06 100644
--- a/src/event/modules/ngx_poll_module.c
+++ b/src/event/modules/ngx_poll_module.c
@@ -22,7 +22,7 @@ static char *ngx_poll_init_conf(ngx_cycle_t *cycle, void *conf);
static struct pollfd *event_list;
-static ngx_int_t nevents;
+static ngx_uint_t nevents;
static ngx_str_t poll_name = ngx_string("poll");
@@ -198,7 +198,7 @@ ngx_poll_del_event(ngx_event_t *ev, ngx_int_t event, ngx_uint_t flags)
if (e == NULL || e->index == NGX_INVALID_INDEX) {
nevents--;
- if (ev->index < (ngx_uint_t) nevents) {
+ if (ev->index < nevents) {
ngx_log_debug2(NGX_LOG_DEBUG_EVENT, ev->log, 0,
"index: copy event %ui to %i", nevents, ev->index);
@@ -212,11 +212,11 @@ ngx_poll_del_event(ngx_event_t *ev, ngx_int_t event, ngx_uint_t flags)
"unexpected last event");
} else {
- if (c->read->index == (ngx_uint_t) nevents) {
+ if (c->read->index == nevents) {
c->read->index = ev->index;
}
- if (c->write->index == (ngx_uint_t) nevents) {
+ if (c->write->index == nevents) {
c->write->index = ev->index;
}
}
@@ -240,8 +240,8 @@ ngx_poll_process_events(ngx_cycle_t *cycle, ngx_msec_t timer, ngx_uint_t flags)
{
int ready, revents;
ngx_err_t err;
- ngx_int_t i, nready;
- ngx_uint_t found, level;
+ ngx_int_t nready;
+ ngx_uint_t i, found, level;
ngx_event_t *ev, **queue;
ngx_connection_t *c;