Mercurial > hg > nginx
diff src/os/unix/ngx_writev_chain.c @ 5851:150df089fe47
Removed the "complete" variable from various send chain functions.
It was made redundant by the previous change, since the "sent" variable
is no longer modified.
author | Valentin Bartenev <vbart@nginx.com> |
---|---|
date | Wed, 13 Aug 2014 15:11:45 +0400 |
parents | f9c83484d9ce |
children | a6e83ac70af9 |
line wrap: on
line diff
--- a/src/os/unix/ngx_writev_chain.c +++ b/src/os/unix/ngx_writev_chain.c @@ -23,7 +23,7 @@ ngx_writev_chain(ngx_connection_t *c, ng u_char *prev; ssize_t n, size, sent; off_t send, prev_send; - ngx_uint_t eintr, complete; + ngx_uint_t eintr; ngx_err_t err; ngx_array_t vec; ngx_chain_t *cl; @@ -64,7 +64,6 @@ ngx_writev_chain(ngx_connection_t *c, ng prev = NULL; iov = NULL; eintr = 0; - complete = 0; prev_send = send; vec.nelts = 0; @@ -137,10 +136,6 @@ ngx_writev_chain(ngx_connection_t *c, ng ngx_log_debug1(NGX_LOG_DEBUG_EVENT, c->log, 0, "writev: %z", sent); - if (send - prev_send == sent) { - complete = 1; - } - c->sent += sent; cl = ngx_handle_sent_chain(in, sent); @@ -149,7 +144,7 @@ ngx_writev_chain(ngx_connection_t *c, ng continue; } - if (!complete) { + if (send - prev_send != sent) { wev->ready = 0; return cl; }