From 7e087adb33f7de50e1ff7bf012e83c4cedbb6e75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Grubbstr=C3=B6m=20=28Grubba=29?= <grubba@grubba.org> Date: Sat, 24 Jul 1999 13:38:49 +0200 Subject: [PATCH] Fixed typos in the code for FreeBSD-style and HPUX-style sendfile(2). Rev: src/modules/files/sendfile.c:1.21 --- src/modules/files/sendfile.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/modules/files/sendfile.c b/src/modules/files/sendfile.c index 5d89ee0dc8..5d1221ccb4 100644 --- a/src/modules/files/sendfile.c +++ b/src/modules/files/sendfile.c @@ -1,5 +1,5 @@ /* - * $Id: sendfile.c,v 1.20 1999/06/23 19:50:28 grubba Exp $ + * $Id: sendfile.c,v 1.21 1999/07/24 11:38:49 grubba Exp $ * * Sends headers + from_fd[off..off+len-1] + trailers to to_fd asyncronously. * @@ -290,7 +290,7 @@ int send_iov(int fd, struct iovec *iov, int iovcnt) sent += bytes; while (bytes) { - if (bytes >= iov->iov_len) { + if ((unsigned int)bytes >= iov->iov_len) { bytes -= iov->iov_len; iov++; iovcnt--; @@ -327,7 +327,6 @@ TH_RETURN_TYPE worker(void *this_) struct sf_hdtr hdtr = { NULL, 0, NULL, 0 }; SF_DFPRINTF((stderr, "sendfile: Using FreeBSD-style sendfile()\n")); - struct sf_hdtr hdtr = { NULL, 0, NULL, 0 }; if (this->hd_cnt) { hdtr.headers = this->hd_iov; hdtr.hdr_cnt = this->hd_cnt; @@ -340,7 +339,6 @@ TH_RETURN_TYPE worker(void *this_) #else /* !HAVE_FREEBSD_SENDFILE */ struct iovec hdtr[2] = { NULL, 0, NULL, 0 }; SF_DFPRINTF((stderr, "sendfile: Using HP/UX-style sendfile()\n")); - struct sf_hdtr hdtr = { NULL, 0, NULL, 0 }; /* NOTE: hd_cnt/tr_cnt are always 0 or 1 since * we've joined the headers/trailers in sf_create(). -- GitLab