diff options
Diffstat (limited to 'src/lib9/fmt/fmtprint.c')
-rw-r--r-- | src/lib9/fmt/fmtprint.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib9/fmt/fmtprint.c b/src/lib9/fmt/fmtprint.c index 7044d5bd..84a74c8a 100644 --- a/src/lib9/fmt/fmtprint.c +++ b/src/lib9/fmt/fmtprint.c @@ -17,7 +17,6 @@ #include "fmt.h" #include "fmtdef.h" - /* * format a string into the output buffer * designed for formats which themselves call fmt, @@ -32,15 +31,16 @@ fmtprint(Fmt *f, char *fmt, ...) f->flags = 0; f->width = 0; f->prec = 0; - va_copy(va, f->args); + VA_COPY(va, f->args); + VA_END(f->args); va_start(f->args, fmt); n = dofmt(f, fmt); va_end(f->args); f->flags = 0; f->width = 0; f->prec = 0; - va_copy(f->args,va); - va_end(va); + VA_COPY(f->args,va); + VA_END(va); if(n >= 0) return 0; return n; |