diff options
author | rsc <devnull@localhost> | 2004-08-22 15:39:56 +0000 |
---|---|---|
committer | rsc <devnull@localhost> | 2004-08-22 15:39:56 +0000 |
commit | 984e353160593b20d1e2944e1f2e9ce2117c8490 (patch) | |
tree | d7347f9d2ffa06d1033fb41712257a2001fd4d57 /src/libbio | |
parent | c8c0df440f1a22effd43023368c801e1351e31ed (diff) | |
download | plan9port-984e353160593b20d1e2944e1f2e9ce2117c8490.tar.gz plan9port-984e353160593b20d1e2944e1f2e9ce2117c8490.tar.bz2 plan9port-984e353160593b20d1e2944e1f2e9ce2117c8490.zip |
PowerPC Linux support from ericvh.
Mainly adding va_copy/va_end.
Also fix bug in sprint wrapping
around top of memory.
Diffstat (limited to 'src/libbio')
-rw-r--r-- | src/libbio/bprint.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libbio/bprint.c b/src/libbio/bprint.c index 2b66605c..f8a4d94f 100644 --- a/src/libbio/bprint.c +++ b/src/libbio/bprint.c @@ -11,9 +11,10 @@ Bprint(Biobuf *bp, char *fmt, ...) if(Bfmtinit(&f, bp) < 0) return -1; va_start(args, fmt); - f.args = args; + va_copy(f.args, args); n = dofmt(&f, fmt); va_end(args); + va_end(f.args); if(n > 0 && Bfmtflush(&f) < 0) return -1; return n; |