diff options
author | yar <yar@FreeBSD.org> | 2004-11-13 13:15:47 +0000 |
---|---|---|
committer | yar <yar@FreeBSD.org> | 2004-11-13 13:15:47 +0000 |
commit | 9e5ec41335ea4a9a5240e0ffcedb7946215e4ed6 (patch) | |
tree | 28e1903d02414cbd18530638262a9c7e379af4ce | |
parent | 0eb6213e4dd08c12836ee7748958a2e5301d2c3a (diff) | |
download | FreeBSD-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.
-rw-r--r-- | libexec/ftpd/ftpcmd.y | 6 | ||||
-rw-r--r-- | libexec/ftpd/ftpd.c | 10 | ||||
-rw-r--r-- | libexec/ftpd/popen.c | 2 |
3 files changed, 9 insertions, 9 deletions
diff --git a/libexec/ftpd/ftpcmd.y b/libexec/ftpd/ftpcmd.y index e664914..2a8708d 100644 --- a/libexec/ftpd/ftpcmd.y +++ b/libexec/ftpd/ftpcmd.y @@ -673,7 +673,7 @@ cmd maxtimeout); } else { timeout = $6.i; - (void) alarm((unsigned) timeout); + (void) alarm(timeout); reply(200, "Maximum IDLE time set to %d seconds", timeout); @@ -1275,7 +1275,7 @@ yylex(void) case CMD: (void) signal(SIGALRM, toolong); - (void) alarm((unsigned) timeout); + (void) alarm(timeout); if (getline(cbuf, sizeof(cbuf)-1, stdin) == NULL) { reply(221, "You could at least say goodbye."); dologout(0); @@ -1494,7 +1494,7 @@ copy(char *s) { char *p; - p = malloc((unsigned) strlen(s) + 1); + p = malloc(strlen(s) + 1); if (p == NULL) fatalerror("Ran out of memory."); (void) strcpy(p, s); 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; diff --git a/libexec/ftpd/popen.c b/libexec/ftpd/popen.c index abc4ec2..05b6d6f 100644 --- a/libexec/ftpd/popen.c +++ b/libexec/ftpd/popen.c @@ -84,7 +84,7 @@ ftpd_popen(char *program, char *type) if (!pids) { if ((fds = getdtablesize()) <= 0) return (NULL); - if ((pids = (int *)malloc((u_int)(fds * sizeof(int)))) == NULL) + if ((pids = malloc(fds * sizeof(int))) == NULL) return (NULL); memset(pids, 0, fds * sizeof(int)); } |