diff options
author | Andrew Tridgell <tridge@samba.org> | 2007-02-06 05:26:25 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:44:42 -0500 |
commit | 8538af1107a6e894d4941708b77e79fac587e35d (patch) | |
tree | 1494d0029526a4c9c7a99a7906749b382a7cab28 /source4/lib/util/xfile.c | |
parent | 80d3b780e566dcb0a23fe4f1a89749acf4c3f470 (diff) | |
download | samba-8538af1107a6e894d4941708b77e79fac587e35d.tar.gz samba-8538af1107a6e894d4941708b77e79fac587e35d.tar.bz2 samba-8538af1107a6e894d4941708b77e79fac587e35d.zip |
r21174: many thanks to Paul Wayper for pointing out that C99 requires a
matching va_end() for each va_copy(). This doesn't matter for most
architectures, but there could be some obscure ones where it does
matter.
some of this should be ported to Samba3
(This used to be commit 21eb316473486cb6b73bb3ff9c5f3a44ecd57e4a)
Diffstat (limited to 'source4/lib/util/xfile.c')
-rw-r--r-- | source4/lib/util/xfile.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source4/lib/util/xfile.c b/source4/lib/util/xfile.c index 1cf77a3220..870cd4c136 100644 --- a/source4/lib/util/xfile.c +++ b/source4/lib/util/xfile.c @@ -203,8 +203,8 @@ size_t x_fwrite(const void *p, size_t size, size_t nmemb, XFILE *f) va_list ap2; va_copy(ap2, ap); - len = vasprintf(&p, format, ap2); + va_end(ap2); if (len <= 0) return len; ret = x_fwrite(p, 1, len, f); SAFE_FREE(p); |