portability: use va_start and va_end in the same function.

* src/complain.c (error_message): Move va_end from here...
(ERROR_MESSAGE): ... to here.
(cherry picked from commit 786578e394)
This commit is contained in:
Joel E. Denny
2009-10-11 16:15:39 -04:00
parent 51f255a530
commit a70596de95
2 changed files with 7 additions and 1 deletions

View File

@@ -68,7 +68,6 @@ error_message (location *loc,
fprintf (stderr, "%s: ", prefix);
vfprintf (stderr, message, args);
va_end (args);
putc ('\n', stderr);
fflush (stderr);
}
@@ -79,6 +78,7 @@ error_message (location *loc,
va_list args; \
va_start (args, Message); \
error_message (Loc, Prefix, Message, args); \
va_end (args); \
}