openbsd-ports/security/socks5/patches/patch-clients_ftp_ftp_c
2004-01-05 03:32:11 +00:00

44 lines
959 B
Plaintext

$OpenBSD: patch-clients_ftp_ftp_c,v 1.1 2004/01/05 03:32:11 espie Exp $
--- clients/ftp/ftp.c.orig 2004-01-05 04:24:46.000000000 +0100
+++ clients/ftp/ftp.c 2004-01-05 04:25:42.000000000 +0100
@@ -48,7 +48,7 @@
#include <fcntl.h>
#endif
-#include <varargs.h>
+#include <stdarg.h>
#ifdef FASCIST
#include <syslog.h>
@@ -241,9 +241,8 @@ void cmdabort() {
}
/*VARARGS*/
-int command(va_alist) va_dcl {
+int command(char *fmt, ...) {
va_list ap;
- char *fmt;
int r;
Sig_t oldintr;
@@ -251,8 +250,7 @@ int command(va_alist) va_dcl {
if (debug) {
printf("---> ");
- va_start(ap);
- fmt = va_arg(ap, char *);
+ va_start(ap, fmt);
if (strncmp("PASS ", fmt, 5) == 0)
printf("PASS XXXX");
else
@@ -271,8 +269,7 @@ int command(va_alist) va_dcl {
oldintr = Signal(SIGINT, cmdabort);
- va_start(ap);
- fmt = va_arg(ap, char *);
+ va_start(ap, fmt);
vfprintf(cout, fmt, ap);
va_end(ap);