aboutsummaryrefslogtreecommitdiff
path: root/libexec/ftpd
diff options
context:
space:
mode:
authorYaroslav Tykhiy <ytykhiy@gmail.com>2004-10-15 09:38:13 +0000
committerYaroslav Tykhiy <ytykhiy@gmail.com>2004-10-15 09:38:13 +0000
commit2f492fc8834f58df3faa449410bb31af65a45379 (patch)
treea79a257455ff81c9340d250e59fb1d9083438e9c /libexec/ftpd
parent2e22b91434ede570526a309f4bce2bae5dfcafdf (diff)
downloadsrc-2f492fc8834f58df3faa449410bb31af65a45379.tar.gz
src-2f492fc8834f58df3faa449410bb31af65a45379.zip
Clean-up around sendfile(): drop an excessive check for error condition.
Notes
Notes: svn path=/head/; revision=136555
Diffstat (limited to 'libexec/ftpd')
-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 f2aef51f2c7e..271bd2fb9ae1 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);
/*