=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ftp/ftp.c,v retrieving revision 1.63 retrieving revision 1.64 diff -c -r1.63 -r1.64 *** src/usr.bin/ftp/ftp.c 2006/05/16 16:20:42 1.63 --- src/usr.bin/ftp/ftp.c 2006/05/16 23:43:16 1.64 *************** *** 1,4 **** ! /* $OpenBSD: ftp.c,v 1.63 2006/05/16 16:20:42 deraadt Exp $ */ /* $NetBSD: ftp.c,v 1.27 1997/08/18 10:20:23 lukem Exp $ */ /* --- 1,4 ---- ! /* $OpenBSD: ftp.c,v 1.64 2006/05/16 23:43:16 ray Exp $ */ /* $NetBSD: ftp.c,v 1.27 1997/08/18 10:20:23 lukem Exp $ */ /* *************** *** 60,66 **** */ #if !defined(lint) && !defined(SMALL) ! static const char rcsid[] = "$OpenBSD: ftp.c,v 1.63 2006/05/16 16:20:42 deraadt Exp $"; #endif /* not lint and not SMALL */ #include --- 60,66 ---- */ #if !defined(lint) && !defined(SMALL) ! static const char rcsid[] = "$OpenBSD: ftp.c,v 1.64 2006/05/16 23:43:16 ray Exp $"; #endif /* not lint and not SMALL */ #include *************** *** 331,337 **** getreply(int expecteof) { char current_line[BUFSIZ]; /* last line of previous reply */ ! int c, n, line; int dig; int originalcode = 0, continuation = 0; sig_t oldintr; --- 331,337 ---- getreply(int expecteof) { char current_line[BUFSIZ]; /* last line of previous reply */ ! int c, n, lineno; int dig; int originalcode = 0, continuation = 0; sig_t oldintr; *************** *** 340,346 **** memset(current_line, 0, sizeof(current_line)); oldintr = signal(SIGINT, cmdabort); ! for (line = 0 ;; line++) { dig = n = code = 0; cp = current_line; while ((c = fgetc(cin)) != '\n') { --- 340,346 ---- memset(current_line, 0, sizeof(current_line)); oldintr = signal(SIGINT, cmdabort); ! for (lineno = 0 ;; lineno++) { dig = n = code = 0; cp = current_line; while ((c = fgetc(cin)) != '\n') { *************** *** 422,428 **** (void)putc(c, ttyout); (void)fflush (ttyout); } ! if (line == 0) { size_t len = cp - current_line; if (len > sizeof(reply_string)) --- 422,428 ---- (void)putc(c, ttyout); (void)fflush (ttyout); } ! if (lineno == 0) { size_t len = cp - current_line; if (len > sizeof(reply_string)) *************** *** 1433,1439 **** if (sendport) { char hname[NI_MAXHOST], pbuf[NI_MAXSERV]; ! int af; union sockunion tmp; tmp = data_addr; --- 1433,1439 ---- if (sendport) { char hname[NI_MAXHOST], pbuf[NI_MAXSERV]; ! int af_tmp; union sockunion tmp; tmp = data_addr; *************** *** 1447,1460 **** case AF_INET6: if (tmp.su_family == AF_INET6) tmp.su_sin6.sin6_scope_id = 0; ! af = (tmp.su_family == AF_INET) ? 1 : 2; if (getnameinfo((struct sockaddr *)&tmp, tmp.su_len, hname, sizeof(hname), pbuf, sizeof(pbuf), NI_NUMERICHOST | NI_NUMERICSERV)) { result = ERROR; } else { result = command("EPRT |%d|%s|%s|", ! af, hname, pbuf); if (result != COMPLETE) { epsv4bad = 1; if (debug) { --- 1447,1460 ---- case AF_INET6: if (tmp.su_family == AF_INET6) tmp.su_sin6.sin6_scope_id = 0; ! af_tmp = (tmp.su_family == AF_INET) ? 1 : 2; if (getnameinfo((struct sockaddr *)&tmp, tmp.su_len, hname, sizeof(hname), pbuf, sizeof(pbuf), NI_NUMERICHOST | NI_NUMERICSERV)) { result = ERROR; } else { result = command("EPRT |%d|%s|%s|", ! af_tmp, hname, pbuf); if (result != COMPLETE) { epsv4bad = 1; if (debug) {