Mercurial > hg > nginx
diff src/core/ngx_hunk.h @ 148:5afee0074707
nginx-0.0.1-2003-10-17-00:19:16 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Thu, 16 Oct 2003 20:19:16 +0000 |
parents | be71fca7f9d7 |
children | eac26585476e |
line wrap: on
line diff
--- a/src/core/ngx_hunk.h Tue Oct 14 15:06:38 2003 +0000 +++ b/src/core/ngx_hunk.h Thu Oct 16 20:19:16 2003 +0000 @@ -85,9 +85,9 @@ (h->type == (h->type & (NGX_HUNK_FLUSH|NGX_HUNK_LAST))) -#define nxg_hunk_size(h) \ - (h->type & NGX_HUNK_IN_MEMORY) ? h->last - h->pos: \ - (size_t) h->file_last - h->file_pos +#define ngx_hunk_size(h) \ + ((h->type & NGX_HUNK_IN_MEMORY) ? h->last - h->pos: \ + (size_t) (h->file_last - h->file_pos)) ngx_hunk_t *ngx_create_temp_hunk(ngx_pool_t *pool, int size, @@ -108,14 +108,13 @@ #define ngx_alloc_ce_and_set_hunk ngx_add_hunk_to_chain -#define ngx_chain_add_ce(ngx_chain_t *chain, ngx_chain_t **last, \ - ngx_chain_t *ce) \ +#define ngx_chain_add_ce(chain, last, ce) \ if (chain) { \ - last->next = ce; \ + *last = ce; \ } else { \ chain = ce; \ } \ - last = ce; + last = &ce->next int ngx_chain_add_copy(ngx_pool_t *pool, ngx_chain_t **ch, ngx_chain_t *in);