summaryrefslogtreecommitdiffstats
path: root/libexec/ftpd/ftpd.c
diff options
context:
space:
mode:
authoryar <yar@FreeBSD.org>2004-11-13 13:42:43 +0000
committeryar <yar@FreeBSD.org>2004-11-13 13:42:43 +0000
commitc9044cf500cbf33b09f4589d9447c6b6e0c25dda (patch)
tree92227603acbde3e10eb2c408e4da0262db01d0ae /libexec/ftpd/ftpd.c
parent9e5ec41335ea4a9a5240e0ffcedb7946215e4ed6 (diff)
downloadFreeBSD-src-c9044cf500cbf33b09f4589d9447c6b6e0c25dda.zip
FreeBSD-src-c9044cf500cbf33b09f4589d9447c6b6e0c25dda.tar.gz
Using off_t to pass a block size is obvious overkill.
The size_t type is better suited for that, particularly because the "blksize" argument is to be passed to malloc() and read(). On 64-bit archs it's more to a style issue, but the good style of coding in C is also important.
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 f40bd95..8705dc8 100644
--- a/libexec/ftpd/ftpd.c
+++ b/libexec/ftpd/ftpd.c
@@ -252,7 +252,7 @@ static int guniquefd(char *, char **);
static void lostconn(int);
static void sigquit(int);
static int receive_data(FILE *, FILE *);
-static int send_data(FILE *, FILE *, off_t, off_t, int);
+static int send_data(FILE *, FILE *, size_t, off_t, int);
static struct passwd *
sgetpwnam(char *);
static char *sgetsave(char *);
@@ -2005,7 +2005,7 @@ pdata_err:
* NB: Form isn't handled.
*/
static int
-send_data(FILE *instr, FILE *outstr, off_t blksize, off_t filesize, int isreg)
+send_data(FILE *instr, FILE *outstr, size_t blksize, off_t filesize, int isreg)
{
int c, cp, filefd, netfd;
char *buf;
OpenPOWER on IntegriCloud