Kill ancient casts to integral types left from the K&R era.
They're unneeded and sometimes erroneous now.
This commit is contained in:
parent
0eb6213e4d
commit
9e5ec41335
@ -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);
|
||||
|
@ -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 @@ dataconn(char *name, off_t size, char *mode)
|
||||
(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;
|
||||
|
@ -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));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user