nginx-0.0.1-2003-06-12-09:54:39 import
diff --git a/src/http/ngx_http.c b/src/http/ngx_http.c
index 005f230..10f0023 100644
--- a/src/http/ngx_http.c
+++ b/src/http/ngx_http.c
@@ -513,7 +513,8 @@
 
                     /* prepare for the next cycle */
 
-                    (char *) in_port[p].addrs.elts += in_port[p].addrs.size;
+                    in_port[p].addrs.elts = (char *) in_port[p].addrs.elts
+                                                       + in_port[p].addrs.size;
                     in_port[p].addrs.nelts--;
 
                     in_addr = (ngx_http_in_addr_t *) in_port[p].addrs.elts;
diff --git a/src/http/ngx_http_core_module.h b/src/http/ngx_http_core_module.h
index 4cf966a..df9bcca 100644
--- a/src/http/ngx_http_core_module.h
+++ b/src/http/ngx_http_core_module.h
@@ -35,9 +35,9 @@
 
     ngx_msec_t   post_accept_timeout;
     ssize_t      connection_pool_size;
-    size_t       request_pool_size;
+    ssize_t      request_pool_size;
     ngx_msec_t   client_header_timeout;
-    size_t       client_header_buffer_size;
+    ssize_t      client_header_buffer_size;
     int          large_client_header;
 } ngx_http_core_srv_conf_t;
 
@@ -99,8 +99,8 @@
 
     int           sendfile;                /* sendfile */
     ngx_msec_t    send_timeout;            /* send_timeout */
-    size_t        send_lowat;              /* send_lowat */
-    size_t        discarded_buffer_size;   /* discarded_buffer_size */
+    ssize_t       send_lowat;              /* send_lowat */
+    ssize_t       discarded_buffer_size;   /* discarded_buffer_size */
     ngx_msec_t    keepalive_timeout;       /* keepalive_timeout */
     ngx_msec_t    lingering_time;          /* lingering_time */
     ngx_msec_t    lingering_timeout;       /* lingering_timeout */
diff --git a/src/http/ngx_http_event.c b/src/http/ngx_http_event.c
index 991b87d..06a98a3 100644
--- a/src/http/ngx_http_event.c
+++ b/src/http/ngx_http_event.c
@@ -1035,8 +1035,7 @@
 
 static int ngx_http_read_discarded_body(ngx_http_request_t *r)
 {
-    size_t                     size;
-    ssize_t                    n;
+    ssize_t                    size, n;
     ngx_http_core_loc_conf_t  *clcf;
 
     ngx_log_debug(r->connection->log, "http read discarded body");
@@ -1318,7 +1317,7 @@
                  or the end of parsed header (otherwise)
                  instead of r->header_in->last */
 
-        if ((size_t)(r->header_in->end - r->header_in->last)
+        if (r->header_in->end - r->header_in->last
                                               >= clcf->discarded_buffer_size) {
             r->discarded_buffer = r->header_in->last;
 
diff --git a/src/http/ngx_http_output_filter.c b/src/http/ngx_http_output_filter.c
index 7ee6a96..09b7bfa 100644
--- a/src/http/ngx_http_output_filter.c
+++ b/src/http/ngx_http_output_filter.c
@@ -69,7 +69,7 @@
 int ngx_http_output_filter(ngx_http_request_t *r, ngx_hunk_t *hunk)
 {
     int                             rc;
-    size_t                          size;
+    ssize_t                         size;
     ngx_chain_t                    *ce, *le;
     ngx_http_output_filter_ctx_t   *ctx;
     ngx_http_output_filter_conf_t  *conf;