SCCS-vsn: usr.bin/ftp/ftp.c 5.24.1.3
-static char sccsid[] = "@(#)ftp.c 5.25 (Berkeley) %G%";
+static char sccsid[] = "@(#)ftp.c 5.24.1.3 (Berkeley) %G%";
#endif /* not lint */
#include <sys/param.h>
#endif /* not lint */
#include <sys/param.h>
FILE *fout, *din = 0, *popen();
int (*closefunc)(), pclose(), fclose(), (*oldintr)(), (*oldintp)();
int abortrecv(), oldverbose, oldtype = 0, is_retr, tcrflag, nfnd;
FILE *fout, *din = 0, *popen();
int (*closefunc)(), pclose(), fclose(), (*oldintr)(), (*oldintp)();
int abortrecv(), oldverbose, oldtype = 0, is_retr, tcrflag, nfnd;
- char *buf, *bufp, *gunique(), msg;
+ char *bufp, *gunique(), msg;
+ static char *buf;
static int bufsize;
long bytes = 0, hashbytes = HASHBYTES;
struct fd_set mask;
static int bufsize;
long bytes = 0, hashbytes = HASHBYTES;
struct fd_set mask;
if (buf == NULL) {
perror("malloc");
bufsize = 0;
if (buf == NULL) {
perror("malloc");
bufsize = 0;
goto abort;
}
bufsize = st.st_blksize;
goto abort;
}
bufsize = st.st_blksize;
case TYPE_L:
errno = d = 0;
while ((c = read(fileno(din), buf, bufsize)) > 0) {
case TYPE_L:
errno = d = 0;
while ((c = read(fileno(din), buf, bufsize)) > 0) {
- if ((d = write(fileno(fout), bufp, c)) != c)
+ if ((d = write(fileno(fout), buf, c)) != c)
break;
bytes += c;
if (hash) {
break;
bytes += c;
if (hash) {