summaryrefslogtreecommitdiffstats
path: root/libexec/ftpd/ftpd.c
diff options
context:
space:
mode:
authoryar <yar@FreeBSD.org>2004-10-15 09:38:13 +0000
committeryar <yar@FreeBSD.org>2004-10-15 09:38:13 +0000
commite6e865ec71476755892cc14cfe35809ae34f8e47 (patch)
treea79a257455ff81c9340d250e59fb1d9083438e9c /libexec/ftpd/ftpd.c
parent3cdbfddc4099f9cdb0376850e8c0d50e05d3958f (diff)
downloadFreeBSD-src-e6e865ec71476755892cc14cfe35809ae34f8e47.zip
FreeBSD-src-e6e865ec71476755892cc14cfe35809ae34f8e47.tar.gz
Clean-up around sendfile(): drop an excessive check for error condition.
Diffstat (limited to 'libexec/ftpd/ftpd.c')
-rw-r--r--libexec/ftpd/ftpd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libexec/ftpd/ftpd.c b/libexec/ftpd/ftpd.c
index f2aef51..271bd2f 100644
--- a/libexec/ftpd/ftpd.c
+++ b/libexec/ftpd/ftpd.c
@@ -2042,9 +2042,9 @@ send_data(FILE *instr, FILE *outstr, off_t blksize, off_t filesize, int isreg)
off_t offset;
int err;
- err = cnt = offset = 0;
+ cnt = offset = 0;
- while (err != -1 && filesize > 0) {
+ while (filesize > 0) {
err = sendfile(filefd, netfd, offset, 0,
(struct sf_hdtr *) NULL, &cnt, 0);
/*
OpenPOWER on IntegriCloud