From e2ff3ea920ba6bc3690a333abdaa2e40656f933a Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Tue, 14 Sep 2004 15:55:24 +0000 Subject: nginx-0.0.10-2004-09-14-19:55:24 import --- src/http/ngx_http_core_module.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/http') diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c index 6c4f819b9..f00ae658c 100644 --- a/src/http/ngx_http_core_module.c +++ b/src/http/ngx_http_core_module.c @@ -1479,10 +1479,14 @@ static char *ngx_set_listen(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) ngx_str_t *args; ngx_http_listen_t *ls; - /* TODO: check duplicate 'listen' directives, - add resolved name to server names ??? */ + /* + * TODO: check duplicate 'listen' directives, + * add resolved name to server names ??? + */ - ngx_test_null(ls, ngx_push_array(&scf->listen), NGX_CONF_ERROR); + if (!(ls = ngx_array_push(&scf->listen))) { + return NGX_CONF_ERROR; + } /* AF_INET only */ -- cgit