summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortjr <tjr@FreeBSD.org>2002-09-24 00:47:27 +0000
committertjr <tjr@FreeBSD.org>2002-09-24 00:47:27 +0000
commit530831782a8c7fcb2cec83d815bc05fc887f7d00 (patch)
treeabcb7c61c19a7617c1197587481906f8c7003071
parentf3374bb45c06bf3a170a858c777fdde4c6f23d75 (diff)
downloadFreeBSD-src-530831782a8c7fcb2cec83d815bc05fc887f7d00.zip
FreeBSD-src-530831782a8c7fcb2cec83d815bc05fc887f7d00.tar.gz
Use the new va_copy macro to copy variable argument lists instead of
assignment. This is needed on powerpc but is also more correct for the other ports. Submitted by: grehan Tested on: alpha, i386, sparc64
-rw-r--r--lib/libc/stdio/vfprintf.c2
-rw-r--r--lib/libc/stdio/vfwprintf.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/stdio/vfprintf.c b/lib/libc/stdio/vfprintf.c
index 23914b1..ae5629b 100644
--- a/lib/libc/stdio/vfprintf.c
+++ b/lib/libc/stdio/vfprintf.c
@@ -611,7 +611,7 @@ __vfprintf(FILE *fp, const char *fmt0, va_list ap)
fmt = (char *)fmt0;
argtable = NULL;
nextarg = 1;
- orgap = ap;
+ va_copy(orgap, ap);
uio.uio_iov = iovp = iov;
uio.uio_resid = 0;
uio.uio_iovcnt = 0;
diff --git a/lib/libc/stdio/vfwprintf.c b/lib/libc/stdio/vfwprintf.c
index 7c8e477..26b89d1 100644
--- a/lib/libc/stdio/vfwprintf.c
+++ b/lib/libc/stdio/vfwprintf.c
@@ -589,7 +589,7 @@ __vfwprintf(FILE *fp, const wchar_t *fmt0, va_list ap)
fmt = (wchar_t *)fmt0;
argtable = NULL;
nextarg = 1;
- orgap = ap;
+ va_copy(orgap, ap);
ret = 0;
/*
OpenPOWER on IntegriCloud