From d404c9716322cfe8778e7494e55efb924f35ecaa Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Thu, 16 Oct 2003 20:19:16 +0000 Subject: nginx-0.0.1-2003-10-17-00:19:16 import --- src/core/ngx_hunk.h | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'src/core/ngx_hunk.h') diff --git a/src/core/ngx_hunk.h b/src/core/ngx_hunk.h index a66d47610..3a10076cc 100644 --- a/src/core/ngx_hunk.h +++ b/src/core/ngx_hunk.h @@ -85,9 +85,9 @@ typedef struct { (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 @@ ngx_hunk_t *ngx_create_temp_hunk(ngx_pool_t *pool, int size, #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); -- cgit