svn commit: samba r15856 - in branches/SAMBA_4_0/source/lib/talloc: .

tridge at samba.org tridge at samba.org
Wed May 24 07:45:20 GMT 2006


Author: tridge
Date: 2006-05-24 07:45:19 +0000 (Wed, 24 May 2006)
New Revision: 15856

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=15856

Log:

fixed talloc_asprintf_append() on solaris

Modified:
   branches/SAMBA_4_0/source/lib/talloc/talloc.c


Changeset:
Modified: branches/SAMBA_4_0/source/lib/talloc/talloc.c
===================================================================
--- branches/SAMBA_4_0/source/lib/talloc/talloc.c	2006-05-24 07:35:06 UTC (rev 15855)
+++ branches/SAMBA_4_0/source/lib/talloc/talloc.c	2006-05-24 07:45:19 UTC (rev 15856)
@@ -1066,6 +1066,7 @@
 	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 @@
 	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



More information about the samba-cvs mailing list