svn commit: samba r14288 - in branches/SAMBA_4_0/source/lib/talloc:
.
tridge at samba.org
tridge at samba.org
Mon Mar 13 04:04:39 GMT 2006
Author: tridge
Date: 2006-03-13 04:04:38 +0000 (Mon, 13 Mar 2006)
New Revision: 14288
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=14288
Log:
- make the snprintf call in talloc portable to older solaris boxes
- fixed an error found sing the beam analyser
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-03-13 03:59:58 UTC (rev 14287)
+++ branches/SAMBA_4_0/source/lib/talloc/talloc.c 2006-03-13 04:04:38 UTC (rev 14288)
@@ -293,7 +293,11 @@
for (h=tc->refs;h;h=h->next) {
struct talloc_chunk *p = talloc_parent_chunk(h);
- if ((p==NULL && context==NULL) || TC_PTR_FROM_CHUNK(p) == context) break;
+ if (p == NULL) {
+ if (context == NULL) break;
+ } else if (TC_PTR_FROM_CHUNK(p) == context) {
+ break;
+ }
}
if (h == NULL) {
return -1;
@@ -1010,10 +1014,12 @@
int len;
char *ret;
va_list ap2;
+ char c;
VA_COPY(ap2, ap);
- if ((len = vsnprintf(NULL, 0, fmt, ap2)) < 0) {
+ /* this call looks strange, but it makes it work on older solaris boxes */
+ if ((len = vsnprintf(&c, 1, fmt, ap2)) < 0) {
return NULL;
}
More information about the samba-cvs
mailing list