]> git.kaiwu.me - nginx.git/commitdiff
return NULL instead of NGX_CONF_ERROR on a create conf failure
authorIgor Sysoev <igor@sysoev.ru>
Tue, 2 Jun 2009 16:09:44 +0000 (16:09 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Tue, 2 Jun 2009 16:09:44 +0000 (16:09 +0000)
44 files changed:
src/core/ngx_cycle.c
src/event/modules/ngx_devpoll_module.c
src/event/modules/ngx_epoll_module.c
src/event/modules/ngx_eventport_module.c
src/event/modules/ngx_kqueue_module.c
src/event/modules/ngx_rtsig_module.c
src/event/ngx_event.c
src/event/ngx_event_openssl.c
src/http/modules/ngx_http_access_module.c
src/http/modules/ngx_http_addition_filter_module.c
src/http/modules/ngx_http_auth_basic_module.c
src/http/modules/ngx_http_autoindex_module.c
src/http/modules/ngx_http_browser_module.c
src/http/modules/ngx_http_charset_filter_module.c
src/http/modules/ngx_http_dav_module.c
src/http/modules/ngx_http_fastcgi_module.c
src/http/modules/ngx_http_gzip_filter_module.c
src/http/modules/ngx_http_gzip_static_module.c
src/http/modules/ngx_http_headers_filter_module.c
src/http/modules/ngx_http_image_filter_module.c
src/http/modules/ngx_http_index_module.c
src/http/modules/ngx_http_limit_req_module.c
src/http/modules/ngx_http_limit_zone_module.c
src/http/modules/ngx_http_log_module.c
src/http/modules/ngx_http_map_module.c
src/http/modules/ngx_http_memcached_module.c
src/http/modules/ngx_http_proxy_module.c
src/http/modules/ngx_http_random_index_module.c
src/http/modules/ngx_http_realip_module.c
src/http/modules/ngx_http_referer_module.c
src/http/modules/ngx_http_rewrite_module.c
src/http/modules/ngx_http_secure_link_module.c
src/http/modules/ngx_http_ssi_filter_module.c
src/http/modules/ngx_http_ssl_module.c
src/http/modules/ngx_http_sub_filter_module.c
src/http/modules/ngx_http_userid_filter_module.c
src/http/modules/ngx_http_xslt_filter_module.c
src/http/modules/perl/ngx_http_perl_module.c
src/http/ngx_http_core_module.c
src/http/ngx_http_upstream.c
src/mail/ngx_mail_auth_http_module.c
src/mail/ngx_mail_core_module.c
src/mail/ngx_mail_proxy_module.c
src/mail/ngx_mail_ssl_module.c

index 47d5f56d868f54071300989de268706b47933471..63eec14592cd831fbfb71469ee674fdf2700c22b 100644 (file)
@@ -216,7 +216,7 @@ ngx_init_cycle(ngx_cycle_t *old_cycle)
 
         if (module->create_conf) {
             rv = module->create_conf(cycle);
-            if (rv == NGX_CONF_ERROR) {
+            if (rv == NULL) {
                 ngx_destroy_pool(pool);
                 return NULL;
             }
index 903efe6b5966682036e19459b085adad460bca96..6578862688535e2786996b3a96ac3ebcb699592d 100644 (file)
@@ -550,7 +550,7 @@ ngx_devpoll_create_conf(ngx_cycle_t *cycle)
 
     dpcf = ngx_palloc(cycle->pool, sizeof(ngx_devpoll_conf_t));
     if (dpcf == NULL) {
-        return NGX_CONF_ERROR;
+        return NULL;
     }
 
     dpcf->changes = NGX_CONF_UNSET;
index 71d84710706669ad679af44c46da763c8402ab9b..b3267b37d5c2d312f092f5c150cafeaad16aa602 100644 (file)
@@ -552,7 +552,7 @@ ngx_epoll_create_conf(ngx_cycle_t *cycle)
 
     epcf = ngx_palloc(cycle->pool, sizeof(ngx_epoll_conf_t));
     if (epcf == NULL) {
-        return NGX_CONF_ERROR;
+        return NULL;
     }
 
     epcf->events = NGX_CONF_UNSET;
index 4becf75d07588511187b76c1e0ecc1dfa197bee2..842d631afc01cba80eb6c0ebdd2dd762e34f3722 100644 (file)
@@ -581,7 +581,7 @@ ngx_eventport_create_conf(ngx_cycle_t *cycle)
 
     epcf = ngx_palloc(cycle->pool, sizeof(ngx_eventport_conf_t));
     if (epcf == NULL) {
-        return NGX_CONF_ERROR;
+        return NULL;
     }
 
     epcf->events = NGX_CONF_UNSET;
index 1ad2d8d5a47f60610c035167529973ed7332b438..a84fc8fe1b2508275dffbb4ebc92aab6db99fb55 100644 (file)
@@ -768,7 +768,7 @@ ngx_kqueue_create_conf(ngx_cycle_t *cycle)
 
     kcf = ngx_palloc(cycle->pool, sizeof(ngx_kqueue_conf_t));
     if (kcf == NULL) {
-        return NGX_CONF_ERROR;
+        return NULL;
     }
 
     kcf->changes = NGX_CONF_UNSET;
index 6020936b7c37cb1bc297e59f8d9b5ec7db37efad..926be0de366c965d12a484eaced2358ec220b799 100644 (file)
@@ -691,7 +691,7 @@ ngx_rtsig_create_conf(ngx_cycle_t *cycle)
 
     rtscf = ngx_palloc(cycle->pool, sizeof(ngx_rtsig_conf_t));
     if (rtscf == NULL) {
-        return NGX_CONF_ERROR;
+        return NULL;
     }
 
     rtscf->signo = NGX_CONF_UNSET;
index e30c5636a7201bdeb39d20414a8770b3c069b120..7fc69011546b04c170d7ac8e557a1b653383faca 100644 (file)
@@ -1113,7 +1113,7 @@ ngx_event_create_conf(ngx_cycle_t *cycle)
 
     ecf = ngx_palloc(cycle->pool, sizeof(ngx_event_conf_t));
     if (ecf == NULL) {
-        return NGX_CONF_ERROR;
+        return NULL;
     }
 
     ecf->connections = NGX_CONF_UNSET_UINT;
@@ -1128,7 +1128,7 @@ ngx_event_create_conf(ngx_cycle_t *cycle)
     if (ngx_array_init(&ecf->debug_connection, cycle->pool, 4,
                        sizeof(ngx_event_debug_t)) == NGX_ERROR)
     {
-        return NGX_CONF_ERROR;
+        return NULL;
     }
 
 #endif
index 23a4fbec4fb5b3b09108948abd872c1d0b922c8a..1607814ce36f6227baf1c1ab7d8f131d3335208a 100644 (file)
@@ -2115,7 +2115,7 @@ ngx_openssl_create_conf(ngx_cycle_t *cycle)
 
     oscf = ngx_pcalloc(cycle->pool, sizeof(ngx_openssl_conf_t));
     if (oscf == NULL) {
-        return NGX_CONF_ERROR;
+        return NULL;
     }
 
     /*
index 78b8a6a105ec6ea9b976beacf254243a326c5da3..405aad4efb6e88a75a1fae731a0a850b1b8fc1c7 100644 (file)
@@ -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;
index eb6a4b168734625f3703b21965aa9c9d3aea4955..4076c5374c5babcbdb5702e8a18568c6e51716b1 100644 (file)
@@ -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;
     }
 
     /*
index 1d2d75e735683be708041460040a8a09463c8e74..c9ce694ef6c0947a0fbfa207fc4f6e0c82816894 100644 (file)
@@ -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;
index e6c1b1e2d082ac5f4b7fb21447c8763eaab2050f..698b7636c715b692f148e54fedfce6044ff9d3fb 100644 (file)
@@ -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;
index e0710c1bf2e52295f5a2c160c315bc647f6c8b1f..d400fec7fd6a40fb3e5b5263d79798cf3b95548b 100644 (file)
@@ -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;
     }
 
     /*
index 5f47ec6d14979718e367af88bdd457e8bd136dac..a76499181d41feb16b171f3178eaf9c90ab70b5d 100644 (file)
@@ -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;
     }
 
     /*
index 84a7672a487e98b2a6a4dc681f14ff1cfe7770ec..7f53d54162aecffc1ce8ef51086120463f654cf9 100644 (file)
@@ -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;
     }
 
     /*
index 6064133c232006bb90a6c5f7745f853b17fb6ef8..2373d7cdfc878aff7672b10428d9856143b366de 100644 (file)
@@ -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;
     }
 
     /*
index 7c7ca0a6cb1d7e76fe780e6e97e5cc5c0c70f5b4..62b430b7170fafaeaa9bbbc67ce6a0c9a36d7a7d 100644 (file)
@@ -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;
     }
 
     /*
index 22e806ac3b3316afd9e9f4431eee9d1238d1c75a..19e4128417177d6f8718de25f39048ff278863d2 100644 (file)
@@ -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;
index 13cef0bea096ba3d5639b257e8200a7c5dcdc9b4..3b5ebd68f956091523529990dbf891faf20af2d5 100644 (file)
@@ -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;
     }
 
     /*
index 293a61fc37b84e7fd063dbe946ed8d65725bda8a..b0e5fed6b7280c32ff303e2af4e850c37375630e 100644 (file)
@@ -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;
index f88e599a7ed042c710626e454b87607399b514ad..d94fc118ca49f12ceef6b724dd2a9b46be906831 100644 (file)
@@ -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;
index 3d20b295d0c8753b6077bb9e370a0f4c9072699b..2a07c74e5372baf0e4a4f4db3468f42f39f64ccf 100644 (file)
@@ -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;
     }
 
     /*
index e11e0815b9ba4ec1d49cea3db913f345dcdd6993..95f07c6b57c89cbcb53ed22c48469b55aea84edb 100644 (file)
@@ -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;
     }
 
     /*
index efe720bf501b6601463ab43e83c69693e8d59366..170e3a2649b6de212e4a8c91c6b7ba08d5e677c2 100644 (file)
@@ -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;
index d0eb02c649639f9d54964b290e2bd405a88ffeef..1f7786c3ce952fdbc059c247d18d925b92c5b548 100644 (file)
@@ -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;
index f68be1e4416bc738c8cce1c46ebc586eceaaf072..e613a207961a309293a80caf5afadb8fce9a1c63 100644 (file)
@@ -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;
     }
 
     /*
index 132f7d13460081fc7820910572777ae390b7e66a..6d7350176cb162fd56dee67e14c9088c3a4a9270 100644 (file)
@@ -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;
     }
 
     /*
index 7ddb819afd96ab35a512b0c92c2cf286e9efbda4..bb5544ae6d9ec27bca96b424c24ce8a772eacf57 100644 (file)
@@ -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;
index b069a1ebaef2879ea56a13da2ebbb8a6d144ff5e..3b2cce679814955624575a78127ce2e06e225b96 100644 (file)
@@ -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;
     }
 
     /*
index 05828997b32eda70b866f9a77dbfd63c86d8fc58..658f4a19c2c6529a43df238a898d633b4aafae9d 100644 (file)
@@ -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)
index a848443561115bb7af9a808dab255f2bc8f7a56f..840c05330b5e1dc4489886b2c7e88c153fa8d186 100644 (file)
@@ -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;
index 049a45c3e07af940a08ca35c75aded9ccb1f7c91..2f9351d91c76f47fe0cf581670b5c79d84647c4d 100644 (file)
@@ -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;
     }
 
     /*
index d27d854a83fa70999917a84e242b8dd02923f93f..97b58fa0a56f0ea166f9f17802a917d62087d383 100644 (file)
@@ -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;
     }
 
     /*
index 3bf52a2c75ebdd9b7a33d16b91f0c63449585d32..c0fd6fdda7d8ee314265af04cb2548eddb105207 100644 (file)
@@ -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;
     }
 
     /*
index 34f32946da67e2be097712f9370c3d14b31cee5e..9f078819d59774210e3cc8131c36bfbe32aedb1d 100644 (file)
@@ -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;
     }
 
     /*
index 3462f649cb50f5438f00a4e93040ffc484204769..9997274a65e8b2025e1fdfacdc7304a1ec1c5c82 100644 (file)
@@ -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;
     }
 
     /*
index ab3118f78c0208fd4bf6903a3c1fd6a227599458..87828f96229277ecc6a015d3f039ab522e1186da 100644 (file)
@@ -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;
     }
 
     /*
index e22428a78b93f27dc34575400040428a7971978e..4409e8fa725f93b3b77ab00ac6bcd04f06c815b1 100644 (file)
@@ -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;
     }
 
     /*
index e2f7b862114fe7bd8d39bd3d8cd6cf3f1c259fdb..3d2ccd083fda802aa90d8f323deec23945a50d7b 100644 (file)
@@ -2703,14 +2703,14 @@ ngx_http_core_create_main_conf(ngx_conf_t *cf)
 
     cmcf = ngx_pcalloc(cf->pool, sizeof(ngx_http_core_main_conf_t));
     if (cmcf == NULL) {
-        return NGX_CONF_ERROR;
+        return NULL;
     }
 
     if (ngx_array_init(&cmcf->servers, cf->pool, 4,
                        sizeof(ngx_http_core_srv_conf_t *))
         != NGX_OK)
     {
-        return NGX_CONF_ERROR;
+        return NULL;
     }
 
     cmcf->server_names_hash_max_size = NGX_CONF_UNSET_UINT;
@@ -2762,7 +2762,7 @@ ngx_http_core_create_srv_conf(ngx_conf_t *cf)
 
     cscf = ngx_pcalloc(cf->pool, sizeof(ngx_http_core_srv_conf_t));
     if (cscf == NULL) {
-        return NGX_CONF_ERROR;
+        return NULL;
     }
 
     /*
@@ -2775,14 +2775,14 @@ ngx_http_core_create_srv_conf(ngx_conf_t *cf)
                        sizeof(ngx_http_listen_t))
         != NGX_OK)
     {
-        return NGX_CONF_ERROR;
+        return NULL;
     }
 
     if (ngx_array_init(&cscf->server_names, cf->temp_pool, 4,
                        sizeof(ngx_http_server_name_t))
         != NGX_OK)
     {
-        return NGX_CONF_ERROR;
+        return NULL;
     }
 
     cscf->connection_pool_size = NGX_CONF_UNSET_SIZE;
@@ -2893,7 +2893,7 @@ ngx_http_core_create_loc_conf(ngx_conf_t *cf)
 
     lcf = ngx_pcalloc(cf->pool, sizeof(ngx_http_core_loc_conf_t));
     if (lcf == NULL) {
-        return NGX_CONF_ERROR;
+        return NULL;
     }
 
     /*
index eb839e11b75724dcc4442a940b2bebf7ef90f158..1d9ccb8b0e9e86cdc172a19ee345e817ffde4c95 100644 (file)
@@ -4182,7 +4182,7 @@ ngx_http_upstream_create_main_conf(ngx_conf_t *cf)
                        sizeof(ngx_http_upstream_srv_conf_t *))
         != NGX_OK)
     {
-        return NGX_CONF_ERROR;
+        return NULL;
     }
 
     return umcf;
index f7ad3085b8c56be221ef0d48efcc3bca12415245..acd06656f4ef72a63cfad0a6519cb8cc2a26e4f7 100644 (file)
@@ -1302,7 +1302,7 @@ ngx_mail_auth_http_create_conf(ngx_conf_t *cf)
 
     ahcf = ngx_pcalloc(cf->pool, sizeof(ngx_mail_auth_http_conf_t));
     if (ahcf == NULL) {
-        return NGX_CONF_ERROR;
+        return NULL;
     }
 
     ahcf->timeout = NGX_CONF_UNSET_MSEC;
index d0addb059d0594a7c05d3656a9566fab45351979..bd2c916d5a49be2c04a3afa785e3c0b270ea3300 100644 (file)
@@ -120,20 +120,20 @@ ngx_mail_core_create_main_conf(ngx_conf_t *cf)
 
     cmcf = ngx_pcalloc(cf->pool, sizeof(ngx_mail_core_main_conf_t));
     if (cmcf == NULL) {
-        return NGX_CONF_ERROR;
+        return NULL;
     }
 
     if (ngx_array_init(&cmcf->servers, cf->pool, 4,
                        sizeof(ngx_mail_core_srv_conf_t *))
         != NGX_OK)
     {
-        return NGX_CONF_ERROR;
+        return NULL;
     }
 
     if (ngx_array_init(&cmcf->listen, cf->pool, 4, sizeof(ngx_mail_listen_t))
         != NGX_OK)
     {
-        return NGX_CONF_ERROR;
+        return NULL;
     }
 
     return cmcf;
index 193df8adad0c34d0985208f9e5fcc188c6ccf7e5..b408ed7d3bd6fbfb9de28e03624361e123198ef8 100644 (file)
@@ -1061,7 +1061,7 @@ ngx_mail_proxy_create_conf(ngx_conf_t *cf)
 
     pcf = ngx_pcalloc(cf->pool, sizeof(ngx_mail_proxy_conf_t));
     if (pcf == NULL) {
-        return NGX_CONF_ERROR;
+        return NULL;
     }
 
     pcf->enable = NGX_CONF_UNSET;
index 4e2bda5f2ca3aee3b591ab93c604b615bda015b9..1fcdb7559b30af3027385b862abd4389c7d9d684 100644 (file)
@@ -166,7 +166,7 @@ ngx_mail_ssl_create_conf(ngx_conf_t *cf)
 
     scf = ngx_pcalloc(cf->pool, sizeof(ngx_mail_ssl_conf_t));
     if (scf == NULL) {
-        return NGX_CONF_ERROR;
+        return NULL;
     }
 
     /*