From d07090a88025eaf8187b170dba0fb8c27c177f42 Mon Sep 17 00:00:00 2001 From: "Tim J. Robbins" Date: Tue, 24 Sep 2002 00:47:27 +0000 Subject: 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 --- lib/libc/stdio/vfprintf.c | 2 +- lib/libc/stdio/vfwprintf.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/libc/stdio/vfprintf.c b/lib/libc/stdio/vfprintf.c index 23914b1796d4..ae5629b495a6 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 7c8e47788e79..26b89d17cb09 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; /* -- cgit v1.2.3