# HG changeset patch # User Igor Sysoev # Date 1217881551 0 # Node ID 071bc0fc14592ea70fcc718bfe911ef7fbf31452 # Parent c99db89ebf35b2b48e0245d1f9a1d726ba6a644a style fix diff -r c99db89ebf35 -r 071bc0fc1459 src/http/modules/ngx_http_xslt_filter_module.c --- a/src/http/modules/ngx_http_xslt_filter_module.c Mon Aug 04 20:23:21 2008 +0000 +++ b/src/http/modules/ngx_http_xslt_filter_module.c Mon Aug 04 20:25:51 2008 +0000 @@ -36,8 +36,8 @@ typedef struct { xmlDtdPtr dtd; ngx_array_t sheets; /* ngx_http_xslt_sheet_t */ - ngx_hash_t types_hash; - ngx_array_t *keys; + ngx_hash_t types; + ngx_array_t *types_keys; } ngx_http_xslt_filter_conf_t; @@ -148,7 +148,7 @@ NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF|NGX_CONF_1MORE, ngx_http_types_slot, NGX_HTTP_LOC_CONF_OFFSET, - offsetof(ngx_http_xslt_filter_conf_t, keys), + offsetof(ngx_http_xslt_filter_conf_t, types_keys), &ngx_http_xslt_default_types[0] }, ngx_null_command @@ -206,7 +206,7 @@ conf = ngx_http_get_module_loc_conf(r, ngx_http_xslt_filter_module); if (conf->sheets.nelts == 0 - || ngx_http_test_content_type(r, &conf->types_hash) == NULL) + || ngx_http_test_content_type(r, &conf->types) == NULL) { return ngx_http_next_header_filter(r); } @@ -1053,8 +1053,10 @@ /* * set by ngx_pcalloc(): * - * conf->dtd - * conf->sheets + * conf->dtd = NULL; + * conf->sheets = { NULL }; + * conf->types = { NULL }; + * conf->types_keys = NULL; */ return conf; @@ -1075,8 +1077,9 @@ conf->sheets = prev->sheets; } - if (ngx_http_merge_types(cf, conf->keys, &conf->types_hash, prev->keys, - &prev->types_hash, ngx_http_xslt_default_types) + if (ngx_http_merge_types(cf, conf->types_keys, &conf->types, + prev->types_keys, &prev->types, + ngx_http_xslt_default_types) != NGX_OK) { return NGX_CONF_ERROR;