aboutsummaryrefslogtreecommitdiff
path: root/src/os/unix/ngx_writev_chain.c
diff options
context:
space:
mode:
authorValentin Bartenev <vbart@nginx.com>2014-08-13 15:11:45 +0400
committerValentin Bartenev <vbart@nginx.com>2014-08-13 15:11:45 +0400
commit77d61350a4ac83166555b140e0995c57dcffd696 (patch)
tree8d1cc18b76ce6decf004a53de504f82e5f2fcb96 /src/os/unix/ngx_writev_chain.c
parent4aac91049f8909e928580f9fb8b752ba748f4167 (diff)
downloadnginx-77d61350a4ac83166555b140e0995c57dcffd696.tar.gz
nginx-77d61350a4ac83166555b140e0995c57dcffd696.zip
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.
Diffstat (limited to 'src/os/unix/ngx_writev_chain.c')
-rw-r--r--src/os/unix/ngx_writev_chain.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/os/unix/ngx_writev_chain.c b/src/os/unix/ngx_writev_chain.c
index ff16f86e3..8e5021696 100644
--- 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, ngx_chain_t *in, off_t limit)
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, ngx_chain_t *in, off_t limit)
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, ngx_chain_t *in, off_t limit)
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, ngx_chain_t *in, off_t limit)
continue;
}
- if (!complete) {
+ if (send - prev_send != sent) {
wev->ready = 0;
return cl;
}