summaryrefslogtreecommitdiff
path: root/source4/torture/basic/charset.c
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 /source4/torture/basic/charset.c
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 'source4/torture/basic/charset.c')
-rw-r--r--source4/torture/basic/charset.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/source4/torture/basic/charset.c b/source4/torture/basic/charset.c
index 33ab2c9768..5ac299dbbe 100644
--- a/source4/torture/basic/charset.c
+++ b/source4/torture/basic/charset.c
@@ -42,7 +42,7 @@ static NTSTATUS unicode_open(struct torture_context *tctx,
{
union smb_open io;
char *fname, *fname2=NULL, *ucs_name;
- int i;
+ size_t i;
NTSTATUS status;
ucs_name = talloc_size(mem_ctx, (1+u_name_len)*2);
@@ -56,8 +56,7 @@ static NTSTATUS unicode_open(struct torture_context *tctx,
}
SSVAL(ucs_name, i*2, 0);
- i = convert_string_talloc_convenience(ucs_name, lp_iconv_convenience(tctx->lp_ctx), CH_UTF16, CH_UNIX, ucs_name, (1+u_name_len)*2, (void **)&fname, false);
- if (i == -1) {
+ if (!convert_string_talloc_convenience(ucs_name, lp_iconv_convenience(tctx->lp_ctx), CH_UTF16, CH_UNIX, ucs_name, (1+u_name_len)*2, (void **)&fname, &i, false)) {
torture_comment(tctx, "Failed to convert UCS2 Name into unix - convert_string_talloc() failure\n");
talloc_free(ucs_name);
return NT_STATUS_NO_MEMORY;