aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2018-07-31 11:51:13 +0300
committerSergey Poznyakoff <gray@gnu.org>2018-07-31 11:55:21 +0300
commit4ef7f9ab13bcf8483050c932110c88f7ae9c75a7 (patch)
tree4b3ab69d4c1c9f82acc1e63fdc4067690929b8e9
parent970930e09c25ea7e07cd728961ae601d3dd22c41 (diff)
downloadpaxutils-4ef7f9ab13bcf8483050c932110c88f7ae9c75a7.tar.gz
paxutils-4ef7f9ab13bcf8483050c932110c88f7ae9c75a7.tar.bz2
Fix in rmt
* rmt/rmt.c (VDEBUG): Take 3 arguments. Maintain a local va_list variable. (rmt_write): Add missing va_end
-rw-r--r--rmt/rmt.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/rmt/rmt.c b/rmt/rmt.c
index fff83b8..658a243 100644
--- a/rmt/rmt.c
+++ b/rmt/rmt.c
@@ -51,13 +51,16 @@ FILE *dbgout;
} \
while (0)
-#define VDEBUG(lev, pfx, fmt, ap) \
+#define VDEBUG(lev, pfx, fmt) \
do \
{ \
if (dbgout && (lev) <= dbglev) \
{ \
+ va_list aptr; \
+ va_start (aptr, fmt); \
fprintf (dbgout, "%s", pfx); \
- vfprintf (dbgout, fmt, ap); \
+ vfprintf (dbgout, fmt, aptr); \
+ va_end (aptr); \
} \
} \
while (0)
@@ -100,8 +103,9 @@ rmt_write (const char *fmt, ...)
va_list ap;
va_start (ap, fmt);
vfprintf (stdout, fmt, ap);
+ va_end (ap);
fflush (stdout);
- VDEBUG (10, "S: ", fmt, ap);
+ VDEBUG (10, "S: ", fmt);
}
static void

Return to:

Send suggestions and report system problems to the System administrator.