summaryrefslogtreecommitdiff
path: root/source4/lib/talloc
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2006-04-08 16:05:21 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:04:00 -0500
commit4a61e4901ebc751fea57880424f9045e3bdf238e (patch)
tree98f0c68e041de8d0001a9d3dd996b0790e1473e8 /source4/lib/talloc
parent69979ddc6e6a5b36f710ec6155b50c00568f68cf (diff)
downloadsamba-4a61e4901ebc751fea57880424f9045e3bdf238e.tar.gz
samba-4a61e4901ebc751fea57880424f9045e3bdf238e.tar.bz2
samba-4a61e4901ebc751fea57880424f9045e3bdf238e.zip
r14999: Remove more unused autoconf code
Simplify va_copy() replacement code a bit (This used to be commit a5c87360a7f14a90b831ea372277f4f89ee4c5f1)
Diffstat (limited to 'source4/lib/talloc')
-rw-r--r--source4/lib/talloc/talloc.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/source4/lib/talloc/talloc.c b/source4/lib/talloc/talloc.c
index 99ede462b8..8f046a02b8 100644
--- a/source4/lib/talloc/talloc.c
+++ b/source4/lib/talloc/talloc.c
@@ -999,13 +999,11 @@ char *talloc_strndup(const void *t, const char *p, size_t n)
return ret;
}
-#ifndef VA_COPY
-#ifdef HAVE_VA_COPY
-#define VA_COPY(dest, src) va_copy(dest, src)
-#elif defined(HAVE___VA_COPY)
-#define VA_COPY(dest, src) __va_copy(dest, src)
+#ifndef HAVE_VA_COPY
+#ifdef HAVE___VA_COPY
+#define va_copy(dest, src) __va_copy(dest, src)
#else
-#define VA_COPY(dest, src) (dest) = (src)
+#define va_copy(dest, src) (dest) = (src)
#endif
#endif
@@ -1016,7 +1014,7 @@ char *talloc_vasprintf(const void *t, const char *fmt, va_list ap)
va_list ap2;
char c;
- VA_COPY(ap2, ap);
+ va_copy(ap2, ap);
/* this call looks strange, but it makes it work on older solaris boxes */
if ((len = vsnprintf(&c, 1, fmt, ap2)) < 0) {
@@ -1025,7 +1023,7 @@ char *talloc_vasprintf(const void *t, const char *fmt, va_list ap)
ret = _talloc(t, len+1);
if (ret) {
- VA_COPY(ap2, ap);
+ va_copy(ap2, ap);
vsnprintf(ret, len+1, fmt, ap2);
talloc_set_name_const(ret, ret);
}
@@ -1067,7 +1065,7 @@ char *talloc_vasprintf_append(char *s, const char *fmt, va_list ap)
tc = talloc_chunk_from_ptr(s);
- VA_COPY(ap2, ap);
+ va_copy(ap2, ap);
s_len = tc->size - 1;
if ((len = vsnprintf(NULL, 0, fmt, ap2)) <= 0) {
@@ -1083,7 +1081,7 @@ char *talloc_vasprintf_append(char *s, const char *fmt, va_list ap)
s = talloc_realloc(NULL, s, char, s_len + len+1);
if (!s) return NULL;
- VA_COPY(ap2, ap);
+ va_copy(ap2, ap);
vsnprintf(s+s_len, len+1, fmt, ap2);
talloc_set_name_const(s, s);