diff options
author | Valentin Bartenev <vbart@nginx.com> | 2013-12-26 17:03:16 +0400 |
---|---|---|
committer | Valentin Bartenev <vbart@nginx.com> | 2013-12-26 17:03:16 +0400 |
commit | df49024997ab8141c3fe827977898c2523029e7f (patch) | |
tree | d00e415d811586716f70c9da85aee2dd576aa202 /src | |
parent | 75dad742e547f766ff17e38deda44d8dcb2caf9b (diff) | |
download | nginx-df49024997ab8141c3fe827977898c2523029e7f.tar.gz nginx-df49024997ab8141c3fe827977898c2523029e7f.zip |
SPDY: refactored loop in ngx_http_spdy_body_filter().
No functional changes.
Diffstat (limited to 'src')
-rw-r--r-- | src/http/ngx_http_spdy_filter_module.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/http/ngx_http_spdy_filter_module.c b/src/http/ngx_http_spdy_filter_module.c index c6926b20b..148b017e1 100644 --- a/src/http/ngx_http_spdy_filter_module.c +++ b/src/http/ngx_http_spdy_filter_module.c @@ -618,7 +618,7 @@ ngx_http_spdy_body_filter(ngx_http_request_t *r, ngx_chain_t *in) { off_t size; ngx_buf_t *b; - ngx_chain_t *cl, *ll, *out, **ln; + ngx_chain_t *cl, *out, **ln; ngx_http_spdy_stream_t *stream; ngx_http_spdy_out_frame_t *frame; @@ -644,10 +644,9 @@ ngx_http_spdy_body_filter(ngx_http_request_t *r, ngx_chain_t *in) size = 0; ln = &out; - ll = in; - for ( ;; ) { - b = ll->buf; + do { + b = in->buf; #if 1 if (ngx_buf_size(b) == 0 && !ngx_buf_special(b)) { ngx_log_error(NGX_LOG_ALERT, r->connection->log, 0, @@ -678,12 +677,9 @@ ngx_http_spdy_body_filter(ngx_http_request_t *r, ngx_chain_t *in) *ln = cl; ln = &cl->next; - if (ll->next == NULL) { - break; - } + in = in->next; - ll = ll->next; - } + } while (in); if (size > NGX_SPDY_MAX_FRAME_SIZE) { ngx_log_error(NGX_LOG_ALERT, r->connection->log, 0, |