comparison src/os/unix/ngx_files.c @ 2210:2cae41e51622

fix build on Linux and Solaris introduced in r2200
author Igor Sysoev <igor@sysoev.ru>
date Tue, 26 Aug 2008 17:15:11 +0000
parents ffb512f0eabd
children c7c319896bb4
comparison
equal deleted inserted replaced
2209:da860de4ff74 2210:2cae41e51622
278 278
279 279
280 ngx_int_t 280 ngx_int_t
281 ngx_read_glob(ngx_glob_t *gl, ngx_str_t *name) 281 ngx_read_glob(ngx_glob_t *gl, ngx_str_t *name)
282 { 282 {
283 if (gl->n < (size_t) gl->pglob.gl_matchc) { 283 size_t count;
284
285 #ifdef GLOB_NOMATCH
286 count = (size_t) gl->pglob.gl_pathc;
287 #else
288 count = (size_t) gl->pglob.gl_matchc;
289 #endif
290
291 if (gl->n < count) {
284 292
285 name->len = (size_t) ngx_strlen(gl->pglob.gl_pathv[gl->n]); 293 name->len = (size_t) ngx_strlen(gl->pglob.gl_pathv[gl->n]);
286 name->data = (u_char *) gl->pglob.gl_pathv[gl->n]; 294 name->data = (u_char *) gl->pglob.gl_pathv[gl->n];
287 gl->n++; 295 gl->n++;
288 296