diff src/event/ngx_event.c @ 290:87e73f067470

nginx-0.0.2-2004-03-16-10:10:12 import
author Igor Sysoev <igor@sysoev.ru>
date Tue, 16 Mar 2004 07:10:12 +0000
parents f81d075ad172
children 744965ec6275
line wrap: on
line diff
--- a/src/event/ngx_event.c
+++ b/src/event/ngx_event.c
@@ -126,7 +126,8 @@ ngx_module_t  ngx_event_core_module = {
 
 static int ngx_event_init(ngx_cycle_t *cycle)
 {
-    int                  m, i, fd;
+    ngx_uint_t           m, i;
+    ngx_socket_t         fd;
     ngx_event_t         *rev, *wev;
     ngx_listening_t     *s;
     ngx_connection_t    *c;
@@ -174,7 +175,7 @@ static int ngx_event_init(ngx_cycle_t *c
 
     c = cycle->connections;
     for (i = 0; i < cycle->connection_n; i++) {
-        c[i].fd = -1;
+        c[i].fd = (ngx_socket_t) -1;
     }
 
     cycle->read_events = ngx_alloc(sizeof(ngx_event_t) * ecf->connections,
@@ -250,7 +251,7 @@ static int ngx_event_init(ngx_cycle_t *c
                     return NGX_ERROR;
                 }
 
-                cycle->old_cycle->connections[fd].fd = -1;
+                cycle->old_cycle->connections[fd].fd = (ngx_socket_t) -1;
             }
         }