The branch, master has been updated via 466da70 charconv: Use talloc_tos() in the S3 build from 7cd5a79 Arg. I hate the "if (xxx) return foo" all on one line style of code.
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit 466da70d7796b4c740b4e5d2dabb114e057cf400 Author: Volker Lendecke <v...@samba.org> Date: Thu Mar 31 08:25:32 2011 +0200 charconv: Use talloc_tos() in the S3 build In S3 we put a talloc_pool on top of the stack so that an allocation from talloc_tos() normally is just a pointer increment. Autobuild-User: Volker Lendecke <vlen...@samba.org> Autobuild-Date: Thu Mar 31 09:14:01 CEST 2011 on sn-devel-104 ----------------------------------------------------------------------- Summary of changes: lib/util/charset/iconv.c | 10 +++++++++- 1 files changed, 9 insertions(+), 1 deletions(-) Changeset truncated at 500 lines: diff --git a/lib/util/charset/iconv.c b/lib/util/charset/iconv.c index 74b931f..045fd13 100644 --- a/lib/util/charset/iconv.c +++ b/lib/util/charset/iconv.c @@ -175,8 +175,16 @@ _PUBLIC_ size_t smb_iconv(smb_iconv_t cd, #ifndef SMB_ICONV_BUFSIZE #define SMB_ICONV_BUFSIZE 2048 #endif + TALLOC_CTX *mem_ctx; size_t bufsize; - char *cvtbuf = talloc_array(cd, char, SMB_ICONV_BUFSIZE); + char *cvtbuf; + +#if _SAMBA_BUILD_ == 3 + mem_ctx = talloc_tos(); +#else + mem_ctx = cd; +#endif + cvtbuf = talloc_array(mem_ctx, char, SMB_ICONV_BUFSIZE); if (!cvtbuf) { return (size_t)-1; -- Samba Shared Repository