diff options
author | Igor Sysoev <igor@sysoev.ru> | 2009-06-02 20:09:44 +0400 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2009-06-02 20:09:44 +0400 |
commit | 260c4321d71806f51d124d79cdff8e8e496a4956 (patch) | |
tree | a6fe073d5f57d49b05562f9ce020b3a532c85c8c /src/http/modules | |
parent | 05822df0cb9dcf9909f4d82be7ce1becd108eeac (diff) |
return NULL instead of NGX_CONF_ERROR on a create conf failure
Diffstat (limited to 'src/http/modules')
30 files changed, 42 insertions, 42 deletions
diff --git a/src/http/modules/ngx_http_access_module.c b/src/http/modules/ngx_http_access_module.c index 78b8a6a10..405aad4ef 100644 --- a/src/http/modules/ngx_http_access_module.c +++ b/src/http/modules/ngx_http_access_module.c @@ -201,7 +201,7 @@ ngx_http_access_create_loc_conf(ngx_conf_t *cf) conf = ngx_pcalloc(cf->pool, sizeof(ngx_http_access_loc_conf_t)); if (conf == NULL) { - return NGX_CONF_ERROR; + return NULL; } return conf; diff --git a/src/http/modules/ngx_http_addition_filter_module.c b/src/http/modules/ngx_http_addition_filter_module.c index eb6a4b168..4076c5374 100644 --- a/src/http/modules/ngx_http_addition_filter_module.c +++ b/src/http/modules/ngx_http_addition_filter_module.c @@ -212,7 +212,7 @@ ngx_http_addition_create_conf(ngx_conf_t *cf) conf = ngx_pcalloc(cf->pool, sizeof(ngx_http_addition_conf_t)); if (conf == NULL) { - return NGX_CONF_ERROR; + return NULL; } /* diff --git a/src/http/modules/ngx_http_auth_basic_module.c b/src/http/modules/ngx_http_auth_basic_module.c index 1d2d75e73..c9ce694ef 100644 --- a/src/http/modules/ngx_http_auth_basic_module.c +++ b/src/http/modules/ngx_http_auth_basic_module.c @@ -372,7 +372,7 @@ ngx_http_auth_basic_create_loc_conf(ngx_conf_t *cf) conf = ngx_pcalloc(cf->pool, sizeof(ngx_http_auth_basic_loc_conf_t)); if (conf == NULL) { - return NGX_CONF_ERROR; + return NULL; } return conf; diff --git a/src/http/modules/ngx_http_autoindex_module.c b/src/http/modules/ngx_http_autoindex_module.c index e6c1b1e2d..698b7636c 100644 --- a/src/http/modules/ngx_http_autoindex_module.c +++ b/src/http/modules/ngx_http_autoindex_module.c @@ -632,7 +632,7 @@ ngx_http_autoindex_create_loc_conf(ngx_conf_t *cf) conf = ngx_palloc(cf->pool, sizeof(ngx_http_autoindex_loc_conf_t)); if (conf == NULL) { - return NGX_CONF_ERROR; + return NULL; } conf->enable = NGX_CONF_UNSET; diff --git a/src/http/modules/ngx_http_browser_module.c b/src/http/modules/ngx_http_browser_module.c index e0710c1bf..d400fec7f 100644 --- a/src/http/modules/ngx_http_browser_module.c +++ b/src/http/modules/ngx_http_browser_module.c @@ -423,7 +423,7 @@ ngx_http_browser_create_conf(ngx_conf_t *cf) conf = ngx_pcalloc(cf->pool, sizeof(ngx_http_browser_conf_t)); if (conf == NULL) { - return NGX_CONF_ERROR; + return NULL; } /* diff --git a/src/http/modules/ngx_http_charset_filter_module.c b/src/http/modules/ngx_http_charset_filter_module.c index 5f47ec6d1..a76499181 100644 --- a/src/http/modules/ngx_http_charset_filter_module.c +++ b/src/http/modules/ngx_http_charset_filter_module.c @@ -1488,27 +1488,27 @@ ngx_http_charset_create_main_conf(ngx_conf_t *cf) mcf = ngx_pcalloc(cf->pool, sizeof(ngx_http_charset_main_conf_t)); if (mcf == NULL) { - return NGX_CONF_ERROR; + return NULL; } if (ngx_array_init(&mcf->charsets, cf->pool, 2, sizeof(ngx_http_charset_t)) != NGX_OK) { - return NGX_CONF_ERROR; + return NULL; } if (ngx_array_init(&mcf->tables, cf->pool, 1, sizeof(ngx_http_charset_tables_t)) != NGX_OK) { - return NGX_CONF_ERROR; + return NULL; } if (ngx_array_init(&mcf->recodes, cf->pool, 2, sizeof(ngx_http_charset_recode_t)) != NGX_OK) { - return NGX_CONF_ERROR; + return NULL; } return mcf; @@ -1522,7 +1522,7 @@ ngx_http_charset_create_loc_conf(ngx_conf_t *cf) lcf = ngx_pcalloc(cf->pool, sizeof(ngx_http_charset_loc_conf_t)); if (lcf == NULL) { - return NGX_CONF_ERROR; + return NULL; } /* diff --git a/src/http/modules/ngx_http_dav_module.c b/src/http/modules/ngx_http_dav_module.c index 84a7672a4..7f53d5416 100644 --- a/src/http/modules/ngx_http_dav_module.c +++ b/src/http/modules/ngx_http_dav_module.c @@ -1154,7 +1154,7 @@ ngx_http_dav_create_loc_conf(ngx_conf_t *cf) conf = ngx_pcalloc(cf->pool, sizeof(ngx_http_dav_loc_conf_t)); if (conf == NULL) { - return NGX_CONF_ERROR; + return NULL; } /* diff --git a/src/http/modules/ngx_http_fastcgi_module.c b/src/http/modules/ngx_http_fastcgi_module.c index 6064133c2..2373d7cdf 100644 --- a/src/http/modules/ngx_http_fastcgi_module.c +++ b/src/http/modules/ngx_http_fastcgi_module.c @@ -1833,7 +1833,7 @@ ngx_http_fastcgi_create_loc_conf(ngx_conf_t *cf) conf = ngx_pcalloc(cf->pool, sizeof(ngx_http_fastcgi_loc_conf_t)); if (conf == NULL) { - return NGX_CONF_ERROR; + return NULL; } /* diff --git a/src/http/modules/ngx_http_gzip_filter_module.c b/src/http/modules/ngx_http_gzip_filter_module.c index 7c7ca0a6c..62b430b71 100644 --- a/src/http/modules/ngx_http_gzip_filter_module.c +++ b/src/http/modules/ngx_http_gzip_filter_module.c @@ -1069,7 +1069,7 @@ ngx_http_gzip_create_conf(ngx_conf_t *cf) conf = ngx_pcalloc(cf->pool, sizeof(ngx_http_gzip_conf_t)); if (conf == NULL) { - return NGX_CONF_ERROR; + return NULL; } /* diff --git a/src/http/modules/ngx_http_gzip_static_module.c b/src/http/modules/ngx_http_gzip_static_module.c index 22e806ac3..19e412841 100644 --- a/src/http/modules/ngx_http_gzip_static_module.c +++ b/src/http/modules/ngx_http_gzip_static_module.c @@ -251,7 +251,7 @@ ngx_http_gzip_static_create_conf(ngx_conf_t *cf) conf = ngx_palloc(cf->pool, sizeof(ngx_http_gzip_static_conf_t)); if (conf == NULL) { - return NGX_CONF_ERROR; + return NULL; } conf->enable = NGX_CONF_UNSET; diff --git a/src/http/modules/ngx_http_headers_filter_module.c b/src/http/modules/ngx_http_headers_filter_module.c index 13cef0bea..3b5ebd68f 100644 --- a/src/http/modules/ngx_http_headers_filter_module.c +++ b/src/http/modules/ngx_http_headers_filter_module.c @@ -421,7 +421,7 @@ ngx_http_headers_create_conf(ngx_conf_t *cf) conf = ngx_pcalloc(cf->pool, sizeof(ngx_http_headers_conf_t)); if (conf == NULL) { - return NGX_CONF_ERROR; + return NULL; } /* diff --git a/src/http/modules/ngx_http_image_filter_module.c b/src/http/modules/ngx_http_image_filter_module.c index 293a61fc3..b0e5fed6b 100644 --- a/src/http/modules/ngx_http_image_filter_module.c +++ b/src/http/modules/ngx_http_image_filter_module.c @@ -947,7 +947,7 @@ ngx_http_image_filter_create_conf(ngx_conf_t *cf) conf = ngx_pcalloc(cf->pool, sizeof(ngx_http_image_filter_conf_t)); if (conf == NULL) { - return NGX_CONF_ERROR; + return NULL; } conf->filter = NGX_CONF_UNSET_UINT; diff --git a/src/http/modules/ngx_http_index_module.c b/src/http/modules/ngx_http_index_module.c index f88e599a7..d94fc118c 100644 --- a/src/http/modules/ngx_http_index_module.c +++ b/src/http/modules/ngx_http_index_module.c @@ -366,7 +366,7 @@ ngx_http_index_create_loc_conf(ngx_conf_t *cf) conf = ngx_palloc(cf->pool, sizeof(ngx_http_index_loc_conf_t)); if (conf == NULL) { - return NGX_CONF_ERROR; + return NULL; } conf->indices = NULL; diff --git a/src/http/modules/ngx_http_limit_req_module.c b/src/http/modules/ngx_http_limit_req_module.c index 3d20b295d..2a07c74e5 100644 --- a/src/http/modules/ngx_http_limit_req_module.c +++ b/src/http/modules/ngx_http_limit_req_module.c @@ -522,7 +522,7 @@ ngx_http_limit_req_create_conf(ngx_conf_t *cf) conf = ngx_pcalloc(cf->pool, sizeof(ngx_http_limit_req_conf_t)); if (conf == NULL) { - return NGX_CONF_ERROR; + return NULL; } /* diff --git a/src/http/modules/ngx_http_limit_zone_module.c b/src/http/modules/ngx_http_limit_zone_module.c index e11e0815b..95f07c6b5 100644 --- a/src/http/modules/ngx_http_limit_zone_module.c +++ b/src/http/modules/ngx_http_limit_zone_module.c @@ -381,7 +381,7 @@ ngx_http_limit_zone_create_conf(ngx_conf_t *cf) conf = ngx_pcalloc(cf->pool, sizeof(ngx_http_limit_zone_conf_t)); if (conf == NULL) { - return NGX_CONF_ERROR; + return NULL; } /* diff --git a/src/http/modules/ngx_http_log_module.c b/src/http/modules/ngx_http_log_module.c index efe720bf5..170e3a264 100644 --- a/src/http/modules/ngx_http_log_module.c +++ b/src/http/modules/ngx_http_log_module.c @@ -714,18 +714,18 @@ ngx_http_log_create_main_conf(ngx_conf_t *cf) conf = ngx_pcalloc(cf->pool, sizeof(ngx_http_log_main_conf_t)); if (conf == NULL) { - return NGX_CONF_ERROR; + return NULL; } if (ngx_array_init(&conf->formats, cf->pool, 4, sizeof(ngx_http_log_fmt_t)) != NGX_OK) { - return NGX_CONF_ERROR; + return NULL; } fmt = ngx_array_push(&conf->formats); if (fmt == NULL) { - return NGX_CONF_ERROR; + return NULL; } fmt->name.len = sizeof("combined") - 1; @@ -735,7 +735,7 @@ ngx_http_log_create_main_conf(ngx_conf_t *cf) fmt->ops = ngx_array_create(cf->pool, 16, sizeof(ngx_http_log_op_t)); if (fmt->ops == NULL) { - return NGX_CONF_ERROR; + return NULL; } return conf; @@ -749,7 +749,7 @@ ngx_http_log_create_loc_conf(ngx_conf_t *cf) conf = ngx_pcalloc(cf->pool, sizeof(ngx_http_log_loc_conf_t)); if (conf == NULL) { - return NGX_CONF_ERROR; + return NULL; } conf->open_file_cache = NGX_CONF_UNSET_PTR; diff --git a/src/http/modules/ngx_http_map_module.c b/src/http/modules/ngx_http_map_module.c index d0eb02c64..1f7786c3c 100644 --- a/src/http/modules/ngx_http_map_module.c +++ b/src/http/modules/ngx_http_map_module.c @@ -160,7 +160,7 @@ ngx_http_map_create_conf(ngx_conf_t *cf) mcf = ngx_palloc(cf->pool, sizeof(ngx_http_map_conf_t)); if (mcf == NULL) { - return NGX_CONF_ERROR; + return NULL; } mcf->hash_max_size = NGX_CONF_UNSET_UINT; diff --git a/src/http/modules/ngx_http_memcached_module.c b/src/http/modules/ngx_http_memcached_module.c index f68be1e44..e613a2079 100644 --- a/src/http/modules/ngx_http_memcached_module.c +++ b/src/http/modules/ngx_http_memcached_module.c @@ -513,7 +513,7 @@ ngx_http_memcached_create_loc_conf(ngx_conf_t *cf) conf = ngx_pcalloc(cf->pool, sizeof(ngx_http_memcached_loc_conf_t)); if (conf == NULL) { - return NGX_CONF_ERROR; + return NULL; } /* diff --git a/src/http/modules/ngx_http_proxy_module.c b/src/http/modules/ngx_http_proxy_module.c index 132f7d134..6d7350176 100644 --- a/src/http/modules/ngx_http_proxy_module.c +++ b/src/http/modules/ngx_http_proxy_module.c @@ -1883,7 +1883,7 @@ ngx_http_proxy_create_loc_conf(ngx_conf_t *cf) conf = ngx_pcalloc(cf->pool, sizeof(ngx_http_proxy_loc_conf_t)); if (conf == NULL) { - return NGX_CONF_ERROR; + return NULL; } /* diff --git a/src/http/modules/ngx_http_random_index_module.c b/src/http/modules/ngx_http_random_index_module.c index 7ddb819af..bb5544ae6 100644 --- a/src/http/modules/ngx_http_random_index_module.c +++ b/src/http/modules/ngx_http_random_index_module.c @@ -280,7 +280,7 @@ ngx_http_random_index_create_loc_conf(ngx_conf_t *cf) conf = ngx_palloc(cf->pool, sizeof(ngx_http_random_index_loc_conf_t)); if (conf == NULL) { - return NGX_CONF_ERROR; + return NULL; } conf->enable = NGX_CONF_UNSET; diff --git a/src/http/modules/ngx_http_realip_module.c b/src/http/modules/ngx_http_realip_module.c index b069a1eba..3b2cce679 100644 --- a/src/http/modules/ngx_http_realip_module.c +++ b/src/http/modules/ngx_http_realip_module.c @@ -360,7 +360,7 @@ ngx_http_realip_create_loc_conf(ngx_conf_t *cf) conf = ngx_pcalloc(cf->pool, sizeof(ngx_http_realip_loc_conf_t)); if (conf == NULL) { - return NGX_CONF_ERROR; + return NULL; } /* diff --git a/src/http/modules/ngx_http_referer_module.c b/src/http/modules/ngx_http_referer_module.c index 05828997b..658f4a19c 100644 --- a/src/http/modules/ngx_http_referer_module.c +++ b/src/http/modules/ngx_http_referer_module.c @@ -221,7 +221,7 @@ ngx_http_referer_create_conf(ngx_conf_t *cf) conf = ngx_pcalloc(cf->pool, sizeof(ngx_http_referer_conf_t)); if (conf == NULL) { - return NGX_CONF_ERROR; + return NULL; } #if (NGX_PCRE) diff --git a/src/http/modules/ngx_http_rewrite_module.c b/src/http/modules/ngx_http_rewrite_module.c index a84844356..840c05330 100644 --- a/src/http/modules/ngx_http_rewrite_module.c +++ b/src/http/modules/ngx_http_rewrite_module.c @@ -220,7 +220,7 @@ ngx_http_rewrite_create_loc_conf(ngx_conf_t *cf) conf = ngx_pcalloc(cf->pool, sizeof(ngx_http_rewrite_loc_conf_t)); if (conf == NULL) { - return NGX_CONF_ERROR; + return NULL; } conf->stack_size = NGX_CONF_UNSET_UINT; diff --git a/src/http/modules/ngx_http_secure_link_module.c b/src/http/modules/ngx_http_secure_link_module.c index 049a45c3e..2f9351d91 100644 --- a/src/http/modules/ngx_http_secure_link_module.c +++ b/src/http/modules/ngx_http_secure_link_module.c @@ -152,7 +152,7 @@ ngx_http_secure_link_create_conf(ngx_conf_t *cf) conf = ngx_pcalloc(cf->pool, sizeof(ngx_http_secure_link_conf_t)); if (conf == NULL) { - return NGX_CONF_ERROR; + return NULL; } /* diff --git a/src/http/modules/ngx_http_ssi_filter_module.c b/src/http/modules/ngx_http_ssi_filter_module.c index d27d854a8..97b58fa0a 100644 --- a/src/http/modules/ngx_http_ssi_filter_module.c +++ b/src/http/modules/ngx_http_ssi_filter_module.c @@ -2689,14 +2689,14 @@ ngx_http_ssi_create_main_conf(ngx_conf_t *cf) smcf = ngx_pcalloc(cf->pool, sizeof(ngx_http_ssi_main_conf_t)); if (smcf == NULL) { - return NGX_CONF_ERROR; + return NULL; } smcf->commands.pool = cf->pool; smcf->commands.temp_pool = cf->temp_pool; if (ngx_hash_keys_array_init(&smcf->commands, NGX_HASH_SMALL) != NGX_OK) { - return NGX_CONF_ERROR; + return NULL; } return smcf; @@ -2736,7 +2736,7 @@ ngx_http_ssi_create_loc_conf(ngx_conf_t *cf) slcf = ngx_pcalloc(cf->pool, sizeof(ngx_http_ssi_loc_conf_t)); if (slcf == NULL) { - return NGX_CONF_ERROR; + return NULL; } /* diff --git a/src/http/modules/ngx_http_ssl_module.c b/src/http/modules/ngx_http_ssl_module.c index 3bf52a2c7..c0fd6fdda 100644 --- a/src/http/modules/ngx_http_ssl_module.c +++ b/src/http/modules/ngx_http_ssl_module.c @@ -302,7 +302,7 @@ ngx_http_ssl_create_srv_conf(ngx_conf_t *cf) sscf = ngx_pcalloc(cf->pool, sizeof(ngx_http_ssl_srv_conf_t)); if (sscf == NULL) { - return NGX_CONF_ERROR; + return NULL; } /* diff --git a/src/http/modules/ngx_http_sub_filter_module.c b/src/http/modules/ngx_http_sub_filter_module.c index 34f32946d..9f078819d 100644 --- a/src/http/modules/ngx_http_sub_filter_module.c +++ b/src/http/modules/ngx_http_sub_filter_module.c @@ -638,7 +638,7 @@ ngx_http_sub_create_conf(ngx_conf_t *cf) slcf = ngx_pcalloc(cf->pool, sizeof(ngx_http_sub_loc_conf_t)); if (slcf == NULL) { - return NGX_CONF_ERROR; + return NULL; } /* diff --git a/src/http/modules/ngx_http_userid_filter_module.c b/src/http/modules/ngx_http_userid_filter_module.c index 3462f649c..9997274a6 100644 --- a/src/http/modules/ngx_http_userid_filter_module.c +++ b/src/http/modules/ngx_http_userid_filter_module.c @@ -570,7 +570,7 @@ ngx_http_userid_create_conf(ngx_conf_t *cf) conf = ngx_pcalloc(cf->pool, sizeof(ngx_http_userid_conf_t)); if (conf == NULL) { - return NGX_CONF_ERROR; + return NULL; } /* diff --git a/src/http/modules/ngx_http_xslt_filter_module.c b/src/http/modules/ngx_http_xslt_filter_module.c index ab3118f78..87828f962 100644 --- a/src/http/modules/ngx_http_xslt_filter_module.c +++ b/src/http/modules/ngx_http_xslt_filter_module.c @@ -1169,7 +1169,7 @@ ngx_http_xslt_filter_create_main_conf(ngx_conf_t *cf) conf = ngx_palloc(cf->pool, sizeof(ngx_http_xslt_filter_main_conf_t)); if (conf == NULL) { - return NGX_CONF_ERROR; + return NULL; } if (ngx_array_init(&conf->dtd_files, cf->pool, 1, @@ -1197,7 +1197,7 @@ ngx_http_xslt_filter_create_conf(ngx_conf_t *cf) conf = ngx_pcalloc(cf->pool, sizeof(ngx_http_xslt_filter_loc_conf_t)); if (conf == NULL) { - return NGX_CONF_ERROR; + return NULL; } /* diff --git a/src/http/modules/perl/ngx_http_perl_module.c b/src/http/modules/perl/ngx_http_perl_module.c index e22428a78..4409e8fa7 100644 --- a/src/http/modules/perl/ngx_http_perl_module.c +++ b/src/http/modules/perl/ngx_http_perl_module.c @@ -784,7 +784,7 @@ ngx_http_perl_create_main_conf(ngx_conf_t *cf) pmcf = ngx_pcalloc(cf->pool, sizeof(ngx_http_perl_main_conf_t)); if (pmcf == NULL) { - return NGX_CONF_ERROR; + return NULL; } if (ngx_array_init(&pmcf->requires, cf->pool, 1, sizeof(u_char *)) @@ -869,7 +869,7 @@ ngx_http_perl_create_loc_conf(ngx_conf_t *cf) plcf = ngx_pcalloc(cf->pool, sizeof(ngx_http_perl_loc_conf_t)); if (plcf == NULL) { - return NGX_CONF_ERROR; + return NULL; } /* |