summaryrefslogtreecommitdiffstats
path: root/src/lib9/fmt/vfprint.c
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2004-08-22 15:39:56 +0000
committerrsc <devnull@localhost>2004-08-22 15:39:56 +0000
commit984e353160593b20d1e2944e1f2e9ce2117c8490 (patch)
treed7347f9d2ffa06d1033fb41712257a2001fd4d57 /src/lib9/fmt/vfprint.c
parentc8c0df440f1a22effd43023368c801e1351e31ed (diff)
downloadplan9port-984e353160593b20d1e2944e1f2e9ce2117c8490.tar.gz
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/lib9/fmt/vfprint.c')
-rw-r--r--src/lib9/fmt/vfprint.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib9/fmt/vfprint.c b/src/lib9/fmt/vfprint.c
index e4ab82ac..711b6588 100644
--- a/src/lib9/fmt/vfprint.c
+++ b/src/lib9/fmt/vfprint.c
@@ -23,8 +23,9 @@ vfprint(int fd, char *fmt, va_list args)
int n;
fmtfdinit(&f, fd, buf, sizeof(buf));
- f.args = args;
+ va_copy(f.args,args);
n = dofmt(&f, fmt);
+ va_end(f.args);
if(n > 0 && __fmtFdFlush(&f) == 0)
return -1;
return n;