summaryrefslogtreecommitdiff
path: root/lib/util/charset/convert_string.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-04-12 14:49:41 +1000
committerAndrew Bartlett <abartlet@samba.org>2011-04-28 03:24:05 +0200
commit4081ea5b49c6b882174d633a1eb03436341c4e63 (patch)
tree63274d4dd7d3b4cf198d4a79fada6f301c55e3ba /lib/util/charset/convert_string.c
parent75d5ba4109801957eef590b601cce61a6e67064f (diff)
downloadsamba-4081ea5b49c6b882174d633a1eb03436341c4e63.tar.gz
samba-4081ea5b49c6b882174d633a1eb03436341c4e63.tar.bz2
samba-4081ea5b49c6b882174d633a1eb03436341c4e63.zip
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 <tridge@samba.org>
Diffstat (limited to 'lib/util/charset/convert_string.c')
-rw-r--r--lib/util/charset/convert_string.c5
1 files changed, 3 insertions, 2 deletions
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) {