Mercurial > hg > nginx
diff src/os/unix/ngx_darwin_sendfile_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 | b63e829621ab |
line wrap: on
line diff
--- a/src/os/unix/ngx_darwin_sendfile_chain.c +++ b/src/os/unix/ngx_darwin_sendfile_chain.c @@ -43,7 +43,7 @@ ngx_darwin_sendfile_chain(ngx_connection u_char *prev; off_t size, send, prev_send, aligned, sent, fprev; off_t header_size, file_size; - ngx_uint_t eintr, complete; + ngx_uint_t eintr; ngx_err_t err; ngx_buf_t *file; ngx_array_t header, trailer; @@ -92,7 +92,6 @@ ngx_darwin_sendfile_chain(ngx_connection file_size = 0; header_size = 0; eintr = 0; - complete = 0; prev_send = send; header.nelts = 0; @@ -311,10 +310,6 @@ ngx_darwin_sendfile_chain(ngx_connection sent = rc > 0 ? rc : 0; } - if (send - prev_send == sent) { - complete = 1; - } - c->sent += sent; in = ngx_handle_sent_chain(in, sent); @@ -323,7 +318,7 @@ ngx_darwin_sendfile_chain(ngx_connection continue; } - if (!complete) { + if (send - prev_send != sent) { wev->ready = 0; return in; }