[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] portability: use va_start and va_end in the same function.
From: |
Joel E. Denny |
Subject: |
[PATCH] portability: use va_start and va_end in the same function. |
Date: |
Sun, 11 Oct 2009 16:39:53 -0400 (EDT) |
User-agent: |
Alpine 1.00 (DEB 882 2007-12-20) |
Based on the va_end man page on my system, we weren't using it portably.
To fix it, I pushed this to master, branch-2.5, and branch-2.4.2.
>From 786578e394700615f6a841614e1280bf6284ec8c Mon Sep 17 00:00:00 2001
From: Joel E. Denny <address@hidden>
Date: Sun, 11 Oct 2009 16:15:39 -0400
Subject: [PATCH] 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.
---
ChangeLog | 6 ++++++
src/complain.c | 2 +-
2 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 45bfbb9..a0e138d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2009-10-11 Joel E. Denny <address@hidden>
+
+ 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.
+
2009-10-08 Joel E. Denny <address@hidden>
* data/bison.m4: Update comments for rename to muscle-tab.h.
diff --git a/src/complain.c b/src/complain.c
index 7bb22de..63dfc93 100644
--- a/src/complain.c
+++ b/src/complain.c
@@ -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); \
}
--
1.5.4.3
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH] portability: use va_start and va_end in the same function.,
Joel E. Denny <=