From 0bb6053946a1572a3496958e543d5c9ddf74120b Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 3 Jun 2002 03:07:24 +0000 Subject: put the ifdef for HAVE_VA_COPY in one place rather than in lots of functions (This used to be commit 1cf3228fdc20f0314d1f8e71ad710a5e548b3f72) --- source3/lib/util.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'source3/lib/util.c') diff --git a/source3/lib/util.c b/source3/lib/util.c index 2fe9ec331b..fe1011668d 100644 --- a/source3/lib/util.c +++ b/source3/lib/util.c @@ -1820,11 +1820,9 @@ int smb_xvasprintf(char **ptr, const char *format, va_list ap) { int n; va_list ap2; -#if defined(HAVE_VA_COPY) - __va_copy(ap2, ap); -#else - ap2 = ap; -#endif + + VA_COPY(ap2, ap); + n = vasprintf(ptr, format, ap2); if (n == -1 || ! *ptr) { smb_panic("smb_xvasprintf: out of memory"); -- cgit