From 4081ea5b49c6b882174d633a1eb03436341c4e63 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Tue, 12 Apr 2011 14:49:41 +1000 Subject: lib/util/charset use convert_string.c in common This brings another layer of the charcnv library in common. Andrew Bartlett Signed-off-by: Andrew Tridgell --- lib/util/charset/convert_string.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/util/charset/convert_string.c') diff --git a/lib/util/charset/convert_string.c b/lib/util/charset/convert_string.c index f1772f448c..41a0c75c10 100644 --- a/lib/util/charset/convert_string.c +++ b/lib/util/charset/convert_string.c @@ -21,6 +21,7 @@ */ #include "includes.h" +#include "system/iconv.h" /** * @file @@ -387,7 +388,7 @@ bool convert_string_talloc_handle(TALLOC_CTX *ctx, struct smb_iconv_handle *ic, } /* +2 is for ucs2 null termination. */ - ob = (char *)TALLOC_REALLOC(ctx, ob, destlen + 2); + ob = talloc_realloc(ctx, ob, char, destlen + 2); if (!ob) { DEBUG(0, ("convert_string_talloc: realloc failed!\n")); @@ -428,7 +429,7 @@ bool convert_string_talloc_handle(TALLOC_CTX *ctx, struct smb_iconv_handle *ic, */ if (o_len > 1024) { /* We're shrinking here so we know the +2 is safe from wrap. */ - ob = (char *)TALLOC_REALLOC(ctx,ob,destlen + 2); + ob = talloc_realloc(ctx,ob, char, destlen + 2); } if (destlen && !ob) { -- cgit