summaryrefslogtreecommitdiff
path: root/source4/lib/talloc
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2006-05-24 07:45:19 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:08:33 -0500
commitd5e3f86ecef324415a056737b94d80510a22118f (patch)
tree333338c7a78db70e49ebbfa961076129615be572 /source4/lib/talloc
parent92acfc07998da1546182579ad12a063f025c9286 (diff)
downloadsamba-d5e3f86ecef324415a056737b94d80510a22118f.tar.gz
samba-d5e3f86ecef324415a056737b94d80510a22118f.tar.bz2
samba-d5e3f86ecef324415a056737b94d80510a22118f.zip
r15856: fixed talloc_asprintf_append() on solaris
(This used to be commit bba33a976b1954b5e9e557c9323afc92616439a3)
Diffstat (limited to 'source4/lib/talloc')
-rw-r--r--source4/lib/talloc/talloc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source4/lib/talloc/talloc.c b/source4/lib/talloc/talloc.c
index b34369cb16..d480cc2689 100644
--- a/source4/lib/talloc/talloc.c
+++ b/source4/lib/talloc/talloc.c
@@ -1066,6 +1066,7 @@ char *talloc_vasprintf_append(char *s, const char *fmt, va_list ap)
struct talloc_chunk *tc;
int len, s_len;
va_list ap2;
+ char c;
if (s == NULL) {
return talloc_vasprintf(NULL, fmt, ap);
@@ -1076,7 +1077,7 @@ char *talloc_vasprintf_append(char *s, const char *fmt, va_list ap)
va_copy(ap2, ap);
s_len = tc->size - 1;
- if ((len = vsnprintf(NULL, 0, fmt, ap2)) <= 0) {
+ if ((len = vsnprintf(&c, 1, fmt, ap2)) <= 0) {
/* Either the vsnprintf failed or the format resulted in
* no characters being formatted. In the former case, we
* ought to return NULL, in the latter we ought to return