summaryrefslogtreecommitdiffstats
path: root/libexec/ftpd/ftpd.c
diff options
context:
space:
mode:
authoryar <yar@FreeBSD.org>2004-11-13 13:15:47 +0000
committeryar <yar@FreeBSD.org>2004-11-13 13:15:47 +0000
commit9e5ec41335ea4a9a5240e0ffcedb7946215e4ed6 (patch)
tree28e1903d02414cbd18530638262a9c7e379af4ce /libexec/ftpd/ftpd.c
parent0eb6213e4dd08c12836ee7748958a2e5301d2c3a (diff)
downloadFreeBSD-src-9e5ec41335ea4a9a5240e0ffcedb7946215e4ed6.zip
FreeBSD-src-9e5ec41335ea4a9a5240e0ffcedb7946215e4ed6.tar.gz
Kill ancient casts to integral types left from the K&R era.
They're unneeded and sometimes erroneous now.
Diffstat (limited to 'libexec/ftpd/ftpd.c')
-rw-r--r--libexec/ftpd/ftpd.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/libexec/ftpd/ftpd.c b/libexec/ftpd/ftpd.c
index 712f713..f40bd95 100644
--- a/libexec/ftpd/ftpd.c
+++ b/libexec/ftpd/ftpd.c
@@ -919,7 +919,7 @@ selecthost(union sockunion *su)
static char *
sgetsave(char *s)
{
- char *new = malloc((unsigned) strlen(s) + 1);
+ char *new = malloc(strlen(s) + 1);
if (new == NULL) {
perror_reply(421, "Local resource failure: malloc");
@@ -1062,7 +1062,7 @@ user(char *name)
* attempt to slow down passwd-guessing programs.
*/
if (login_attempts)
- sleep((unsigned) login_attempts);
+ sleep(login_attempts);
}
/*
@@ -1983,7 +1983,7 @@ pdata_err:
(void) fclose(file);
data = -1;
if (conerrno == EADDRINUSE) {
- sleep((unsigned) swaitint);
+ sleep(swaitint);
retry += swaitint;
} else {
break;
@@ -2093,13 +2093,13 @@ send_data(FILE *instr, FILE *outstr, off_t blksize, off_t filesize, int isreg)
}
oldway:
- if ((buf = malloc((u_int)blksize)) == NULL) {
+ if ((buf = malloc(blksize)) == NULL) {
transflag = 0;
perror_reply(451, "Local resource failure: malloc");
return (-1);
}
- while ((cnt = read(filefd, buf, (u_int)blksize)) > 0 &&
+ while ((cnt = read(filefd, buf, blksize)) > 0 &&
write(netfd, buf, cnt) == cnt)
byte_count += cnt;
transflag = 0;
OpenPOWER on IntegriCloud