Core: slight optimization in ngx_chain_update_chains().
It is not necessary to traverse *busy and link the *out when *out is NULL.
This commit is contained in:
parent
8e9f1df637
commit
42298aeb13
@ -186,17 +186,19 @@ ngx_chain_update_chains(ngx_pool_t *p, ngx_chain_t **free, ngx_chain_t **busy,
|
|||||||
{
|
{
|
||||||
ngx_chain_t *cl;
|
ngx_chain_t *cl;
|
||||||
|
|
||||||
if (*busy == NULL) {
|
if (*out) {
|
||||||
*busy = *out;
|
if (*busy == NULL) {
|
||||||
|
*busy = *out;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
for (cl = *busy; cl->next; cl = cl->next) { /* void */ }
|
for (cl = *busy; cl->next; cl = cl->next) { /* void */ }
|
||||||
|
|
||||||
cl->next = *out;
|
cl->next = *out;
|
||||||
|
}
|
||||||
|
|
||||||
|
*out = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
*out = NULL;
|
|
||||||
|
|
||||||
while (*busy) {
|
while (*busy) {
|
||||||
cl = *busy;
|
cl = *busy;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user