Mercurial > hg > nginx-quic
comparison src/http/modules/ngx_http_log_module.c @ 3516:dd1570b6f237
ngx_str_set() and ngx_str_null()
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Fri, 14 May 2010 09:56:37 +0000 |
parents | 76d252724db5 |
children | eae4a59ae59a |
comparison
equal
deleted
inserted
replaced
3515:76d252724db5 | 3516:dd1570b6f237 |
---|---|
745 fmt = ngx_array_push(&conf->formats); | 745 fmt = ngx_array_push(&conf->formats); |
746 if (fmt == NULL) { | 746 if (fmt == NULL) { |
747 return NULL; | 747 return NULL; |
748 } | 748 } |
749 | 749 |
750 fmt->name.len = sizeof("combined") - 1; | 750 ngx_str_set(&fmt->name, "combined"); |
751 fmt->name.data = (u_char *) "combined"; | |
752 | 751 |
753 fmt->flushes = NULL; | 752 fmt->flushes = NULL; |
754 | 753 |
755 fmt->ops = ngx_array_create(cf->pool, 16, sizeof(ngx_http_log_op_t)); | 754 fmt->ops = ngx_array_create(cf->pool, 16, sizeof(ngx_http_log_op_t)); |
756 if (fmt->ops == NULL) { | 755 if (fmt->ops == NULL) { |
920 if (ngx_strcmp(name.data, "combined") == 0) { | 919 if (ngx_strcmp(name.data, "combined") == 0) { |
921 lmcf->combined_used = 1; | 920 lmcf->combined_used = 1; |
922 } | 921 } |
923 | 922 |
924 } else { | 923 } else { |
925 name.len = sizeof("combined") - 1; | 924 ngx_str_set(&name, "combined"); |
926 name.data = (u_char *) "combined"; | |
927 lmcf->combined_used = 1; | 925 lmcf->combined_used = 1; |
928 } | 926 } |
929 | 927 |
930 fmt = lmcf->formats.elts; | 928 fmt = lmcf->formats.elts; |
931 for (i = 0; i < lmcf->formats.nelts; i++) { | 929 for (i = 0; i < lmcf->formats.nelts; i++) { |