comparison src/core/ngx_conf_file.c @ 194:2357fa41738a

nginx-0.0.1-2003-11-21-09:30:49 import
author Igor Sysoev <igor@sysoev.ru>
date Fri, 21 Nov 2003 06:30:49 +0000
parents c1f3a3c7c5db
children 8dee38ea9117
comparison
equal deleted inserted replaced
193:dd66383796a5 194:2357fa41738a
313 >= ngx_file_size(&cf->conf_file->file.info)) { 313 >= ngx_file_size(&cf->conf_file->file.info)) {
314 return NGX_CONF_FILE_DONE; 314 return NGX_CONF_FILE_DONE;
315 } 315 }
316 316
317 if (h->pos - start) { 317 if (h->pos - start) {
318 ngx_memcpy(h->start, start, h->pos - start); 318 ngx_memcpy(h->start, start, (size_t) (h->pos - start));
319 } 319 }
320 320
321 n = ngx_read_file(&cf->conf_file->file, 321 n = ngx_read_file(&cf->conf_file->file,
322 h->start + (h->pos - start), 322 h->start + (h->pos - start),
323 h->end - (h->start + (h->pos - start)), 323 (size_t) (h->end - (h->start + (h->pos - start))),
324 cf->conf_file->file.offset); 324 cf->conf_file->file.offset);
325 325
326 if (n == NGX_ERROR) { 326 if (n == NGX_ERROR) {
327 return NGX_ERROR; 327 return NGX_ERROR;
328 } 328 }
460 } 460 }
461 461
462 if (found) { 462 if (found) {
463 ngx_test_null(word, ngx_push_array(cf->args), NGX_ERROR); 463 ngx_test_null(word, ngx_push_array(cf->args), NGX_ERROR);
464 ngx_test_null(word->data, 464 ngx_test_null(word->data,
465 ngx_palloc(cf->pool, h->pos - start + 1), 465 ngx_palloc(cf->pool,
466 (size_t) (h->pos - start + 1)),
466 NGX_ERROR); 467 NGX_ERROR);
467 468
468 for (dst = word->data, src = start, len = 0; 469 for (dst = word->data, src = start, len = 0;
469 src < h->pos - 1; 470 src < h->pos - 1;
470 len++) 471 len++)