summaryrefslogtreecommitdiff
path: root/lib/util/charset/tests
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2009-03-01 19:55:46 +0100
committerJelmer Vernooij <jelmer@samba.org>2009-03-01 19:55:46 +0100
commit94069bd2747a8397308c0b0b384f7bb4edd8f68b (patch)
treeace3c4fa9d0cb134d4e904354bd33b395c1e1289 /lib/util/charset/tests
parentbbe2d30f66ebd8537203870b1225179f03d42744 (diff)
downloadsamba-94069bd2747a8397308c0b0b384f7bb4edd8f68b.tar.gz
samba-94069bd2747a8397308c0b0b384f7bb4edd8f68b.tar.bz2
samba-94069bd2747a8397308c0b0b384f7bb4edd8f68b.zip
s4: Use same function signature for convert_* as s3.
Diffstat (limited to 'lib/util/charset/tests')
-rw-r--r--lib/util/charset/tests/iconv.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/lib/util/charset/tests/iconv.c b/lib/util/charset/tests/iconv.c
index fbe7b103ab..091876f63b 100644
--- a/lib/util/charset/tests/iconv.c
+++ b/lib/util/charset/tests/iconv.c
@@ -404,12 +404,12 @@ static bool test_string2key(struct torture_context *tctx)
uint16_t *buf;
char *dest = NULL;
TALLOC_CTX *mem_ctx = talloc_new(tctx);
- ssize_t ret;
size_t len = (random()%1000)+1;
const uint16_t in1[10] = { 'a', 0xd805, 'b', 0xdcf0, 'c', 0, 'd', 'e', 'f', 'g' };
uint8_t le1[20];
uint8_t *munged1;
uint8_t *out1;
+ size_t ret;
int i;
const char *correct = "a\357\277\275b\357\277\275c\001defg";
@@ -418,8 +418,7 @@ static bool test_string2key(struct torture_context *tctx)
torture_comment(tctx, "converting random buffer\n");
- ret = convert_string_talloc(mem_ctx, CH_UTF16MUNGED, CH_UTF8, (void *)buf, len*2, (void**)&dest, false);
- if (ret == -1) {
+ if (!convert_string_talloc(mem_ctx, CH_UTF16MUNGED, CH_UTF8, (void *)buf, len*2, (void**)&dest, &ret, false)) {
torture_fail(tctx, "Failed to convert random buffer\n");
}
@@ -429,8 +428,7 @@ static bool test_string2key(struct torture_context *tctx)
torture_comment(tctx, "converting fixed buffer to UTF16\n");
- ret = convert_string_talloc(mem_ctx, CH_UTF16MUNGED, CH_UTF16, (void *)le1, 20, (void**)&munged1, false);
- if (ret == -1) {
+ if (!convert_string_talloc(mem_ctx, CH_UTF16MUNGED, CH_UTF16, (void *)le1, 20, (void**)&munged1, &ret, false)) {
torture_fail(tctx, "Failed to convert fixed buffer to UTF16_MUNGED\n");
}
@@ -438,8 +436,7 @@ static bool test_string2key(struct torture_context *tctx)
torture_comment(tctx, "converting fixed buffer to UTF8\n");
- ret = convert_string_talloc(mem_ctx, CH_UTF16MUNGED, CH_UTF8, (void *)le1, 20, (void**)&out1, false);
- if (ret == -1) {
+ if (!convert_string_talloc(mem_ctx, CH_UTF16MUNGED, CH_UTF8, (void *)le1, 20, (void**)&out1, &ret, false)) {
torture_fail(tctx, "Failed to convert fixed buffer to UTF8\n");
}