Mercurial > hg > nginx
comparison src/core/ngx_conf_file.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 | b5263e401884 |
children | 0835142149d2 |
comparison
equal
deleted
inserted
replaced
2048:824615f3b4ec | 2049:2a92804f4109 |
---|---|
572 word = ngx_array_push(cf->args); | 572 word = ngx_array_push(cf->args); |
573 if (word == NULL) { | 573 if (word == NULL) { |
574 return NGX_ERROR; | 574 return NGX_ERROR; |
575 } | 575 } |
576 | 576 |
577 word->data = ngx_palloc(cf->pool, b->pos - start + 1); | 577 word->data = ngx_pnalloc(cf->pool, b->pos - start + 1); |
578 if (word->data == NULL) { | 578 if (word->data == NULL) { |
579 return NGX_ERROR; | 579 return NGX_ERROR; |
580 } | 580 } |
581 | 581 |
582 for (dst = word->data, src = start, len = 0; | 582 for (dst = word->data, src = start, len = 0; |
724 len = cycle->root.len; | 724 len = cycle->root.len; |
725 prefix = cycle->root.data; | 725 prefix = cycle->root.data; |
726 } | 726 } |
727 | 727 |
728 name->len = len + old.len; | 728 name->len = len + old.len; |
729 name->data = ngx_palloc(cycle->pool, name->len + 1); | 729 name->data = ngx_pnalloc(cycle->pool, name->len + 1); |
730 if (name->data == NULL) { | 730 if (name->data == NULL) { |
731 return NGX_ERROR; | 731 return NGX_ERROR; |
732 } | 732 } |
733 | 733 |
734 p = ngx_cpymem(name->data, prefix, len); | 734 p = ngx_cpymem(name->data, prefix, len); |