Mercurial > hg > nginx-quic
comparison src/core/ngx_file.c @ 3027:3e1b653fd22f
fix building on 64-bit platforms, introduced in r3025
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Thu, 13 Aug 2009 13:48:41 +0000 |
parents | 8101d9101ed8 |
children | 524ba56ba9f7 |
comparison
equal
deleted
inserted
replaced
3026:f4b5c787fe33 | 3027:3e1b653fd22f |
---|---|
691 size = ngx_file_size(&fi); | 691 size = ngx_file_size(&fi); |
692 } | 692 } |
693 | 693 |
694 len = cf->buf_size ? cf->buf_size : 65536; | 694 len = cf->buf_size ? cf->buf_size : 65536; |
695 | 695 |
696 if (len > size) { | 696 if ((off_t) len > size) { |
697 len = (size_t) size; | 697 len = (size_t) size; |
698 } | 698 } |
699 | 699 |
700 buf = ngx_alloc(len, cf->log); | 700 buf = ngx_alloc(len, cf->log); |
701 if (buf == NULL) { | 701 if (buf == NULL) { |
711 goto failed; | 711 goto failed; |
712 } | 712 } |
713 | 713 |
714 while (size > 0) { | 714 while (size > 0) { |
715 | 715 |
716 if (len > size) { | 716 if ((off_t) len > size) { |
717 len = (size_t) size; | 717 len = (size_t) size; |
718 } | 718 } |
719 | 719 |
720 n = ngx_read_fd(fd, buf, len); | 720 n = ngx_read_fd(fd, buf, len); |
721 | 721 |