summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/lib/talloc/talloc.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/source3/lib/talloc/talloc.c b/source3/lib/talloc/talloc.c
index c073a8c774..c3e5d2c076 100644
--- a/source3/lib/talloc/talloc.c
+++ b/source3/lib/talloc/talloc.c
@@ -1226,8 +1226,7 @@ char *talloc_asprintf(const void *t, const char *fmt, ...)
* accumulating output into a string buffer.
**/
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;
@@ -1236,9 +1235,7 @@ char *talloc_vasprintf_append(char *s, const char *fmt, va_list ap)
return talloc_vasprintf(NULL, fmt, ap);
}
- tc = talloc_chunk_from_ptr(s);
-
- s_len = tc->size - 1;
+ s_len = strlen(s);
va_copy(ap2, ap);
len = vsnprintf(&c, 1, fmt, ap2);