diff libiberty/asprintf.c @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents a06113de4d67
children 84e7813d76e9
line wrap: on
line diff
--- a/libiberty/asprintf.c	Sun Aug 21 07:07:55 2011 +0900
+++ b/libiberty/asprintf.c	Fri Oct 27 22:46:09 2017 +0900
@@ -1,6 +1,6 @@
 /* Like sprintf but provides a pointer to malloc'd storage, which must
    be freed by the caller.
-   Copyright (C) 1997, 2003 Free Software Foundation, Inc.
+   Copyright (C) 1997-2017 Free Software Foundation, Inc.
    Contributed by Cygnus Solutions.
 
 This file is part of the libiberty library.
@@ -47,10 +47,9 @@
 asprintf (char **buf, const char *fmt, ...)
 {
   int status;
-  VA_OPEN (ap, fmt);
-  VA_FIXEDARG (ap, char **, buf);
-  VA_FIXEDARG (ap, const char *, fmt);
+  va_list ap;
+  va_start (ap, fmt);
   status = vasprintf (buf, fmt, ap);
-  VA_CLOSE (ap);
+  va_end (ap);
   return status;
 }