comparison src/http/modules/ngx_http_gzip_filter_module.c @ 2049:2a92804f4109

*) back out r2040 *) refactor ngx_palloc() *) introduce ngx_pnalloc() *) additional pool blocks have smaller header
author Igor Sysoev <igor@sysoev.ru>
date Tue, 17 Jun 2008 15:00:30 +0000
parents 775edc46ee66
children 115e6f029fcc
comparison
equal deleted inserted replaced
2048:824615f3b4ec 2049:2a92804f4109
800 if (ctx == NULL || ctx->zout == 0) { 800 if (ctx == NULL || ctx->zout == 0) {
801 v->not_found = 1; 801 v->not_found = 1;
802 return NGX_OK; 802 return NGX_OK;
803 } 803 }
804 804
805 v->data = ngx_palloc(r->pool, NGX_INT32_LEN + 3); 805 v->data = ngx_pnalloc(r->pool, NGX_INT32_LEN + 3);
806 if (v->data == NULL) { 806 if (v->data == NULL) {
807 return NGX_ERROR; 807 return NGX_ERROR;
808 } 808 }
809 809
810 zint = (ngx_uint_t) (ctx->zin / ctx->zout); 810 zint = (ngx_uint_t) (ctx->zin / ctx->zout);
949 return NGX_CONF_ERROR; 949 return NGX_CONF_ERROR;
950 } 950 }
951 951
952 type->len = value[i].len; 952 type->len = value[i].len;
953 953
954 type->data = ngx_palloc(cf->pool, type->len + 1); 954 type->data = ngx_pnalloc(cf->pool, type->len + 1);
955 if (type->data == NULL) { 955 if (type->data == NULL) {
956 return NGX_CONF_ERROR; 956 return NGX_CONF_ERROR;
957 } 957 }
958 958
959 ngx_cpystrn(type->data, value[i].data, type->len + 1); 959 ngx_cpystrn(type->data, value[i].data, type->len + 1);