Mercurial > hg > nginx
comparison src/core/ngx_hunk.c @ 155:46eb23d9471d
nginx-0.0.1-2003-10-22-20:38:26 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Wed, 22 Oct 2003 16:38:26 +0000 |
parents | eac26585476e |
children | e7e094d34162 |
comparison
equal
deleted
inserted
replaced
154:eac26585476e | 155:46eb23d9471d |
---|---|
97 | 97 |
98 return h; | 98 return h; |
99 } | 99 } |
100 | 100 |
101 | 101 |
102 int ngx_chain_add_copy(ngx_pool_t *pool, ngx_chain_t **ch, ngx_chain_t *in) | 102 int ngx_chain_add_copy(ngx_pool_t *pool, ngx_chain_t **chain, ngx_chain_t *in) |
103 { | 103 { |
104 ngx_chain_t *ce, **le; | 104 ngx_chain_t *cl, **ll; |
105 | 105 |
106 le = ch; | 106 ll = chain; |
107 | 107 |
108 for (ce = *ch; ce; ce = ce->next) { | 108 for (cl = *chain; cl; cl = cl->next) { |
109 le = &ce->next; | 109 ll = &cl->next; |
110 } | 110 } |
111 | 111 |
112 while (in) { | 112 while (in) { |
113 ngx_test_null(ce, ngx_alloc_chain_entry(pool), NGX_ERROR); | 113 ngx_test_null(cl, ngx_alloc_chain_link(pool), NGX_ERROR); |
114 | 114 |
115 ce->hunk = in->hunk; | 115 cl->hunk = in->hunk; |
116 *le = ce; | 116 *ll = cl; |
117 le = &ce->next; | 117 ll = &cl->next; |
118 in = in->next; | 118 in = in->next; |
119 } | 119 } |
120 | 120 |
121 *le = NULL; | 121 *ll = NULL; |
122 | 122 |
123 return NGX_OK; | 123 return NGX_OK; |
124 } | 124 } |
125 | 125 |
126 | 126 |