comparison src/core/ngx_cycle.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 2e91aecb9e57
children 64a10d6b97bd
comparison
equal deleted inserted replaced
2535:ec5825afc7eb 2536:a6d6d762c554
134 } else { 134 } else {
135 n = 20; 135 n = 20;
136 } 136 }
137 137
138 if (ngx_list_init(&cycle->open_files, pool, n, sizeof(ngx_open_file_t)) 138 if (ngx_list_init(&cycle->open_files, pool, n, sizeof(ngx_open_file_t))
139 == NGX_ERROR) 139 != NGX_OK)
140 { 140 {
141 ngx_destroy_pool(pool); 141 ngx_destroy_pool(pool);
142 return NULL; 142 return NULL;
143 } 143 }
144 144
153 } else { 153 } else {
154 n = 1; 154 n = 1;
155 } 155 }
156 156
157 if (ngx_list_init(&cycle->shared_memory, pool, n, sizeof(ngx_shm_zone_t)) 157 if (ngx_list_init(&cycle->shared_memory, pool, n, sizeof(ngx_shm_zone_t))
158 == NGX_ERROR) 158 != NGX_OK)
159 { 159 {
160 ngx_destroy_pool(pool); 160 ngx_destroy_pool(pool);
161 return NULL; 161 return NULL;
162 } 162 }
163 163