Mercurial > hg > nginx
comparison src/core/nginx.c @ 2536:a6d6d762c554
small optimization: " == NGX_ERROR" > " != NGX_OK"
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Tue, 24 Feb 2009 10:42:23 +0000 |
parents | 2abf14c952a2 |
children | ffa8e2451457 |
comparison
equal
deleted
inserted
replaced
2535:ec5825afc7eb | 2536:a6d6d762c554 |
---|---|
386 ngx_log_error(NGX_LOG_NOTICE, cycle->log, 0, | 386 ngx_log_error(NGX_LOG_NOTICE, cycle->log, 0, |
387 "using inherited sockets from \"%s\"", inherited); | 387 "using inherited sockets from \"%s\"", inherited); |
388 | 388 |
389 if (ngx_array_init(&cycle->listening, cycle->pool, 10, | 389 if (ngx_array_init(&cycle->listening, cycle->pool, 10, |
390 sizeof(ngx_listening_t)) | 390 sizeof(ngx_listening_t)) |
391 == NGX_ERROR) | 391 != NGX_OK) |
392 { | 392 { |
393 return NGX_ERROR; | 393 return NGX_ERROR; |
394 } | 394 } |
395 | 395 |
396 for (p = inherited, v = p; *p; p++) { | 396 for (p = inherited, v = p; *p; p++) { |
836 if (ccf->pid.len == 0) { | 836 if (ccf->pid.len == 0) { |
837 ccf->pid.len = sizeof(NGX_PID_PATH) - 1; | 837 ccf->pid.len = sizeof(NGX_PID_PATH) - 1; |
838 ccf->pid.data = (u_char *) NGX_PID_PATH; | 838 ccf->pid.data = (u_char *) NGX_PID_PATH; |
839 } | 839 } |
840 | 840 |
841 if (ngx_conf_full_name(cycle, &ccf->pid, 0) == NGX_ERROR) { | 841 if (ngx_conf_full_name(cycle, &ccf->pid, 0) != NGX_OK) { |
842 return NGX_CONF_ERROR; | 842 return NGX_CONF_ERROR; |
843 } | 843 } |
844 | 844 |
845 ccf->oldpid.len = ccf->pid.len + sizeof(NGX_OLDPID_EXT); | 845 ccf->oldpid.len = ccf->pid.len + sizeof(NGX_OLDPID_EXT); |
846 | 846 |
856 if (ccf->lock_file.len == 0) { | 856 if (ccf->lock_file.len == 0) { |
857 ccf->lock_file.len = sizeof(NGX_LOCK_PATH) - 1; | 857 ccf->lock_file.len = sizeof(NGX_LOCK_PATH) - 1; |
858 ccf->lock_file.data = (u_char *) NGX_LOCK_PATH; | 858 ccf->lock_file.data = (u_char *) NGX_LOCK_PATH; |
859 } | 859 } |
860 | 860 |
861 if (ngx_conf_full_name(cycle, &ccf->lock_file, 0) == NGX_ERROR) { | 861 if (ngx_conf_full_name(cycle, &ccf->lock_file, 0) != NGX_OK) { |
862 return NGX_CONF_ERROR; | 862 return NGX_CONF_ERROR; |
863 } | 863 } |
864 | 864 |
865 { | 865 { |
866 ngx_str_t lock_file; | 866 ngx_str_t lock_file; |