diff options
Diffstat (limited to 'src/core')
| -rw-r--r-- | src/core/ngx_hunk.c | 20 | ||||
| -rw-r--r-- | src/core/ngx_hunk.h | 2 |
2 files changed, 16 insertions, 6 deletions
diff --git a/src/core/ngx_hunk.c b/src/core/ngx_hunk.c index fe26a3329..d2c31d52a 100644 --- a/src/core/ngx_hunk.c +++ b/src/core/ngx_hunk.c @@ -18,8 +18,10 @@ ngx_hunk_t *ngx_create_temp_hunk(ngx_pool_t *pool, int size, h->post_end = h->end + after; h->type = NGX_HUNK_TEMP|NGX_HUNK_IN_MEMORY; - h->tag = 0; h->file = NULL; + h->shadow = NULL; + + h->tag = 0; return h; } @@ -38,8 +40,10 @@ ngx_hunk_t *ngx_create_hunk_before(ngx_pool_t *pool, ngx_hunk_t *hunk, int size) h->file_pos = h->file_last = 0; h->type = NGX_HUNK_TEMP|NGX_HUNK_IN_MEMORY; - h->tag = 0; h->file = NULL; + h->shadow = NULL; + + h->tag = 0; } else { ngx_test_null(h->pre_start, ngx_palloc(pool, size), NULL); @@ -48,8 +52,10 @@ ngx_hunk_t *ngx_create_hunk_before(ngx_pool_t *pool, ngx_hunk_t *hunk, int size) h->file_pos = h->file_last = 0; h->type = NGX_HUNK_TEMP|NGX_HUNK_IN_MEMORY; - h->tag = 0; h->file = NULL; + h->shadow = NULL; + + h->tag = 0; } return h; @@ -71,8 +77,10 @@ ngx_hunk_t *ngx_create_hunk_after(ngx_pool_t *pool, ngx_hunk_t *hunk, int size) h->file_pos = h->file_last = 0; h->type = NGX_HUNK_TEMP|NGX_HUNK_IN_MEMORY; - h->tag = 0; h->file = NULL; + h->shadow = NULL; + + h->tag = 0; } else { ngx_test_null(h->pre_start, ngx_palloc(pool, size), NULL); @@ -81,8 +89,10 @@ ngx_hunk_t *ngx_create_hunk_after(ngx_pool_t *pool, ngx_hunk_t *hunk, int size) h->file_pos = h->file_last = 0; h->type = NGX_HUNK_TEMP|NGX_HUNK_IN_MEMORY; - h->tag = 0; h->file = NULL; + h->shadow = NULL; + + h->tag = 0; } return h; diff --git a/src/core/ngx_hunk.h b/src/core/ngx_hunk.h index ddf4d04d2..c097289d8 100644 --- a/src/core/ngx_hunk.h +++ b/src/core/ngx_hunk.h @@ -79,7 +79,7 @@ ngx_hunk_t *ngx_create_temp_hunk(ngx_pool_t *pool, int size, #define ngx_add_hunk_to_chain(chain, h, pool, error) \ do { \ - ngx_test_null(chain, ngx_create_chain_entry(pool), error); \ + ngx_test_null(chain, ngx_alloc_chain_entry(pool), error); \ chain->hunk = h; \ chain->next = NULL; \ } while (0); |
