tuse fmtprint to avoid va_copy - plan9port - [fork] Plan 9 from user space
HTML git clone git://src.adamsgaard.dk/plan9port
DIR Log
DIR Files
DIR Refs
DIR README
DIR LICENSE
---
DIR commit 65cd9e4d852426549226519b25cf1f1a78445b04
DIR parent ddb664da1bfebeb348c5c9593b0e9d21462214e6
HTML Author: rsc <devnull@localhost>
Date: Tue, 28 Dec 2004 03:40:46 +0000
use fmtprint to avoid va_copy
Diffstat:
M src/libbio/bprint.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
---
DIR diff --git a/src/libbio/bprint.c b/src/libbio/bprint.c
t@@ -10,11 +10,7 @@ Bprint(Biobuf *bp, char *fmt, ...)
if(Bfmtinit(&f, bp) < 0)
return -1;
- va_start(args, fmt);
- va_copy(f.args, args);
- n = dofmt(&f, fmt);
- va_end(args);
- va_end(f.args);
+ n = fmtprint(&f, fmt, args);
if(n > 0 && Bfmtflush(&f) < 0)
return -1;
return n;