1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-29 13:49:30 +03:00

lib/util/charset Always set *converted_size even on failure

The caller may wish to inspect the partially converted string.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Wed Apr 20 05:17:48 CEST 2011 on sn-devel-104
This commit is contained in:
Andrew Bartlett
2011-04-14 17:22:53 +10:00
parent 79e6fea774
commit 6f846ddf32

View File

@ -85,11 +85,9 @@ static bool convert_string_internal(struct smb_iconv_handle *ic,
o_len=destlen;
retval = smb_iconv(descriptor, &inbuf, &i_len, &outbuf, &o_len);
if (retval == (size_t)-1) {
return false;
}
*converted_size = destlen-o_len;
return true;
return (retval != (size_t)-1);
}
/**