diff options
author | Volker Lendecke <vlendec@samba.org> | 2006-08-15 14:07:15 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:38:38 -0500 |
commit | 03e3cd1d5a005ad5fd2bc97f9863abf675efd09f (patch) | |
tree | 183a66f7bb43c7a34f05511a1903a854d963e27d /source3/lib/talloc.c | |
parent | 81e501ad1587b4f75851bc39c826383b112b7cb3 (diff) | |
download | samba-03e3cd1d5a005ad5fd2bc97f9863abf675efd09f.tar.gz samba-03e3cd1d5a005ad5fd2bc97f9863abf675efd09f.tar.xz samba-03e3cd1d5a005ad5fd2bc97f9863abf675efd09f.zip |
r17554: Cleanup
(This used to be commit 761cbd52f0cff6b864c506ec03c94039b6101ef9)
Diffstat (limited to 'source3/lib/talloc.c')
-rw-r--r-- | source3/lib/talloc.c | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/source3/lib/talloc.c b/source3/lib/talloc.c index 35c4ddaf31..0e223e8bbe 100644 --- a/source3/lib/talloc.c +++ b/source3/lib/talloc.c @@ -1136,46 +1136,6 @@ char *talloc_asprintf(const void *t, const char *fmt, ...) return ret; } -int talloc_vasprintf_len(const void *t, char **res, const char *fmt, - va_list ap) -{ - int len; - va_list ap2; - char c; - - 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) { - return len; - } - - *res = (char *)_talloc(t, len+1); - if (*res) { - VA_COPY(ap2, ap); - vsnprintf(*res, len+1, fmt, ap2); - talloc_set_name_const(*res, *res); - } - - return len; -} - - -/* - Perform string formatting, and return a pointer to newly allocated - memory holding the result, inside a memory pool. - */ -int talloc_asprintf_len(const void *t, char **res, const char *fmt, ...) -{ - va_list ap; - int len; - - va_start(ap, fmt); - len = talloc_vasprintf_len(t, res, fmt, ap); - va_end(ap); - return len; -} - /** * Realloc @p s to append the formatted result of @p fmt and @p ap, |