summaryrefslogtreecommitdiff
path: root/lib/util/charset/charset.h
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2011-03-30 13:08:31 -0700
committerJeremy Allison <jra@samba.org>2011-03-30 23:59:37 +0200
commitc109a70531de72eef30a695248b91704bd0c7c24 (patch)
tree29182afa1ae334e8aee0e71e59aa1a0e5de65f6a /lib/util/charset/charset.h
parent9ede19fdccaf09303012208129a093197403ef2c (diff)
downloadsamba-c109a70531de72eef30a695248b91704bd0c7c24.tar.gz
samba-c109a70531de72eef30a695248b91704bd0c7c24.tar.bz2
samba-c109a70531de72eef30a695248b91704bd0c7c24.zip
Fix convert_string() to take a *converted_size arg. and return a bool.
Makes these interfaces much harder to misuse and easier to ensure error checking. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Wed Mar 30 23:59:37 CEST 2011 on sn-devel-104
Diffstat (limited to 'lib/util/charset/charset.h')
-rw-r--r--lib/util/charset/charset.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/util/charset/charset.h b/lib/util/charset/charset.h
index b17ceabd83..7374d6e2ec 100644
--- a/lib/util/charset/charset.h
+++ b/lib/util/charset/charset.h
@@ -150,9 +150,10 @@ bool convert_string_talloc(TALLOC_CTX *ctx,
void const *src, size_t srclen,
void *dest, size_t *converted_size);
-size_t convert_string(charset_t from, charset_t to,
+bool convert_string(charset_t from, charset_t to,
void const *src, size_t srclen,
- void *dest, size_t destlen);
+ void *dest, size_t destlen,
+ size_t *converted_size);
ssize_t iconv_talloc(TALLOC_CTX *mem_ctx,
smb_iconv_t cd,