if (ngx_array_init(&cycle->listening, cycle->pool, 10,
sizeof(ngx_listening_t))
- == NGX_ERROR)
+ != NGX_OK)
{
return NGX_ERROR;
}
ccf->pid.data = (u_char *) NGX_PID_PATH;
}
- if (ngx_conf_full_name(cycle, &ccf->pid, 0) == NGX_ERROR) {
+ if (ngx_conf_full_name(cycle, &ccf->pid, 0) != NGX_OK) {
return NGX_CONF_ERROR;
}
ccf->lock_file.data = (u_char *) NGX_LOCK_PATH;
}
- if (ngx_conf_full_name(cycle, &ccf->lock_file, 0) == NGX_ERROR) {
+ if (ngx_conf_full_name(cycle, &ccf->lock_file, 0) != NGX_OK) {
return NGX_CONF_ERROR;
}
ngx_log_debug1(NGX_LOG_DEBUG_CORE, cf->log, 0, "include %s", file.data);
- if (ngx_conf_full_name(cf->cycle, &file, 1) == NGX_ERROR) {
+ if (ngx_conf_full_name(cf->cycle, &file, 1) != NGX_OK) {
return NGX_CONF_ERROR;
}
if (name) {
full = *name;
- if (ngx_conf_full_name(cycle, &full, 0) == NGX_ERROR) {
+ if (ngx_conf_full_name(cycle, &full, 0) != NGX_OK) {
return NULL;
}
}
if (ngx_list_init(&cycle->open_files, pool, n, sizeof(ngx_open_file_t))
- == NGX_ERROR)
+ != NGX_OK)
{
ngx_destroy_pool(pool);
return NULL;
}
if (ngx_list_init(&cycle->shared_memory, pool, n, sizeof(ngx_shm_zone_t))
- == NGX_ERROR)
+ != NGX_OK)
{
ngx_destroy_pool(pool);
return NULL;
path->name.len--;
}
- if (ngx_conf_full_name(cf->cycle, &path->name, 0) == NGX_ERROR) {
+ if (ngx_conf_full_name(cf->cycle, &path->name, 0) != NGX_OK) {
return NULL;
}
cf->cycle->new_log->file->name = value[1];
if (ngx_conf_full_name(cf->cycle, &cf->cycle->new_log->file->name, 0)
- == NGX_ERROR)
+ != NGX_OK)
{
return NGX_CONF_ERROR;
}
ngx_ssl_certificate(ngx_conf_t *cf, ngx_ssl_t *ssl, ngx_str_t *cert,
ngx_str_t *key)
{
- if (ngx_conf_full_name(cf->cycle, cert, 1) == NGX_ERROR) {
+ if (ngx_conf_full_name(cf->cycle, cert, 1) != NGX_OK) {
return NGX_ERROR;
}
return NGX_ERROR;
}
- if (ngx_conf_full_name(cf->cycle, key, 1) == NGX_ERROR) {
+ if (ngx_conf_full_name(cf->cycle, key, 1) != NGX_OK) {
return NGX_ERROR;
}
return NGX_OK;
}
- if (ngx_conf_full_name(cf->cycle, cert, 1) == NGX_ERROR) {
+ if (ngx_conf_full_name(cf->cycle, cert, 1) != NGX_OK) {
return NGX_ERROR;
}
return NGX_OK;
}
- if (ngx_conf_full_name(cf->cycle, file, 1) == NGX_ERROR) {
+ if (ngx_conf_full_name(cf->cycle, file, 1) != NGX_OK) {
return NGX_ERROR;
}
}
if (ngx_array_init(&mcf->charsets, cf->pool, 2, sizeof(ngx_http_charset_t))
- == NGX_ERROR)
+ != NGX_OK)
{
return NGX_CONF_ERROR;
}
if (ngx_array_init(&mcf->tables, cf->pool, 1,
- sizeof(ngx_http_charset_tables_t)) == NGX_ERROR)
+ sizeof(ngx_http_charset_tables_t))
+ != NGX_OK)
{
return NGX_CONF_ERROR;
}
if (ngx_array_init(&mcf->recodes, cf->pool, 2,
- sizeof(ngx_http_charset_recode_t)) == NGX_ERROR)
+ sizeof(ngx_http_charset_recode_t))
+ != NGX_OK)
{
return NGX_CONF_ERROR;
}
}
if (in) {
- if (ngx_chain_add_copy(r->pool, &ctx->in, in) == NGX_ERROR) {
+ if (ngx_chain_add_copy(r->pool, &ctx->in, in) != NGX_OK) {
goto failed;
}
}
}
} else {
- if (ngx_conf_full_name(cf->cycle, &value[1], 0) == NGX_ERROR) {
+ if (ngx_conf_full_name(cf->cycle, &value[1], 0) != NGX_OK) {
return NGX_CONF_ERROR;
}
if (ngx_strcmp(value[0].data, "include") == 0) {
file = value[1];
- if (ngx_conf_full_name(cf->cycle, &file, 1) == NGX_ERROR){
+ if (ngx_conf_full_name(cf->cycle, &file, 1) != NGX_OK){
return NGX_CONF_ERROR;
}
}
if (ngx_array_init(&ctx->ranges, r->pool, 1, sizeof(ngx_http_range_t))
- == NGX_ERROR)
+ != NGX_OK)
{
return NGX_ERROR;
}
/* add the incoming chain to the chain ctx->in */
if (in) {
- if (ngx_chain_add_copy(r->pool, &ctx->in, in) == NGX_ERROR) {
+ if (ngx_chain_add_copy(r->pool, &ctx->in, in) != NGX_OK) {
return NGX_ERROR;
}
}
out = data;
if (!r->header_sent) {
- if (ngx_http_set_content_type(r) == NGX_ERROR) {
+ if (ngx_http_set_content_type(r) != NGX_OK) {
return NGX_ERROR;
}
/* add the incoming chain to the chain ctx->in */
if (in) {
- if (ngx_chain_add_copy(r->pool, &ctx->in, in) == NGX_ERROR) {
+ if (ngx_chain_add_copy(r->pool, &ctx->in, in) != NGX_OK) {
return NGX_ERROR;
}
}
exten = ngx_pnalloc(r->pool, r->exten.len);
if (exten == NULL) {
- return NGX_HTTP_INTERNAL_SERVER_ERROR;
+ return NGX_ERROR;
}
hash = ngx_hash_strlow(exten, r->exten.data, r->exten.len);
return NULL;
}
- if (ngx_conf_full_name((ngx_cycle_t *) ngx_cycle, path, 0)== NGX_ERROR)
- {
+ if (ngx_conf_full_name((ngx_cycle_t *) ngx_cycle, path, 0) != NGX_OK) {
return NULL;
}
if (ngx_list_init(&sr->headers_out.headers, r->pool, 20,
sizeof(ngx_table_elt_t))
- == NGX_ERROR)
+ != NGX_OK)
{
return NGX_ERROR;
}
if (ngx_strcmp(value[0].data, "include") == 0) {
file = value[1];
- if (ngx_conf_full_name(cf->cycle, &file, 1) == NGX_ERROR){
+ if (ngx_conf_full_name(cf->cycle, &file, 1) != NGX_OK) {
return NGX_CONF_ERROR;
}
if (ngx_array_init(&cscf->listen, cf->temp_pool, 4,
sizeof(ngx_http_listen_t))
- == NGX_ERROR)
+ != NGX_OK)
{
return NGX_CONF_ERROR;
}
if (ngx_array_init(&cscf->server_names, cf->temp_pool, 4,
sizeof(ngx_http_server_name_t))
- == NGX_ERROR)
+ != NGX_OK)
{
return NGX_CONF_ERROR;
}
conf->root.len = sizeof("html") - 1;
conf->root.data = (u_char *) "html";
- if (ngx_conf_full_name(cf->cycle, &conf->root, 0) == NGX_ERROR) {
+ if (ngx_conf_full_name(cf->cycle, &conf->root, 0) != NGX_OK) {
return NGX_CONF_ERROR;
}
}
}
if (lcf->root.data[0] != '$') {
- if (ngx_conf_full_name(cf->cycle, &lcf->root, 0) == NGX_ERROR) {
+ if (ngx_conf_full_name(cf->cycle, &lcf->root, 0) != NGX_OK) {
return NGX_CONF_ERROR;
}
}
}
if (ngx_ssl_create_connection(&sscf->ssl, c, NGX_SSL_BUFFER)
- == NGX_ERROR)
+ != NGX_OK)
{
ngx_http_close_connection(c);
return;
if (ngx_list_init(&r->headers_out.headers, r->pool, 20,
sizeof(ngx_table_elt_t))
- == NGX_ERROR)
+ != NGX_OK)
{
ngx_http_close_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR);
return;
if (ngx_list_init(&r->headers_in.headers, r->pool, 20,
sizeof(ngx_table_elt_t))
- == NGX_ERROR)
+ != NGX_OK)
{
ngx_http_close_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR);
return;
if (ngx_array_init(&r->headers_in.cookies, r->pool, 2,
sizeof(ngx_table_elt_t *))
- == NGX_ERROR)
+ != NGX_OK)
{
ngx_http_close_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR);
return;
if (ngx_ssl_create_connection(u->conf->ssl, c,
NGX_SSL_BUFFER|NGX_SSL_CLIENT)
- == NGX_ERROR)
+ != NGX_OK)
{
ngx_http_upstream_finalize_request(r, u,
NGX_HTTP_INTERNAL_SERVER_ERROR);
if (v == NULL) {
if (ngx_array_init(&cmcf->variables, cf->pool, 4,
- sizeof(ngx_http_variable_t)) == NGX_ERROR)
+ sizeof(ngx_http_variable_t))
+ != NGX_OK)
{
return NGX_ERROR;
}
return NGX_ERROR;
}
- if (ngx_conf_full_name((ngx_cycle_t *) ngx_cycle, &path, 0)
- == NGX_ERROR)
- {
+ if (ngx_conf_full_name((ngx_cycle_t *) ngx_cycle, &path, 0) != NGX_OK) {
return NGX_ERROR;
}
path.data[path.len - 1] = '\0';
- if (ngx_conf_full_name((ngx_cycle_t *) ngx_cycle, &path, 0)
- == NGX_ERROR)
- {
+ if (ngx_conf_full_name((ngx_cycle_t *) ngx_cycle, &path, 0) != NGX_OK) {
return NGX_ERROR;
}
}