summaryrefslogtreecommitdiff
path: root/source3/lib/charcnv.c
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2010-11-01 15:42:21 +0100
committerMichael Adam <obnox@samba.org>2010-11-03 22:45:19 +0000
commit5b6a88b9bf8bd49e179156c29fb3a7268b16808b (patch)
tree8661f38b0a79b0f32bc41e89324b812b00cb68b9 /source3/lib/charcnv.c
parent18104ef1be1989ef496f19118ee68591f5f4be97 (diff)
downloadsamba-5b6a88b9bf8bd49e179156c29fb3a7268b16808b.tar.gz
samba-5b6a88b9bf8bd49e179156c29fb3a7268b16808b.tar.bz2
samba-5b6a88b9bf8bd49e179156c29fb3a7268b16808b.zip
s3:lib/charcnv: rename a parameter for clarity in next_codepoint_ext()
Diffstat (limited to 'source3/lib/charcnv.c')
-rw-r--r--source3/lib/charcnv.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source3/lib/charcnv.c b/source3/lib/charcnv.c
index bdd807da53..57e0f3a789 100644
--- a/source3/lib/charcnv.c
+++ b/source3/lib/charcnv.c
@@ -1809,7 +1809,7 @@ size_t align_string(const void *base_ptr, const char *p, int flags)
*/
codepoint_t next_codepoint_ext(const char *str, charset_t src_charset,
- size_t *size)
+ size_t *bytes_consumed)
{
/* It cannot occupy more than 4 bytes in UTF16 format */
uint8_t buf[4];
@@ -1821,7 +1821,7 @@ codepoint_t next_codepoint_ext(const char *str, charset_t src_charset,
/* fastpath if the character is ASCII */
if ((str[0] & 0x80) == 0) {
- *size = 1;
+ *bytes_consumed = 1;
return (codepoint_t)str[0];
}
@@ -1837,7 +1837,7 @@ codepoint_t next_codepoint_ext(const char *str, charset_t src_charset,
descriptor = conv_handles[src_charset][CH_UTF16LE];
if (descriptor == (smb_iconv_t)-1 || descriptor == (smb_iconv_t)0) {
- *size = 1;
+ *bytes_consumed = 1;
return INVALID_CODEPOINT;
}
@@ -1858,7 +1858,7 @@ codepoint_t next_codepoint_ext(const char *str, charset_t src_charset,
smb_iconv(descriptor, &str, &ilen, &outbuf, &olen);
if (olen == 4) {
/* We didn't convert any bytes */
- *size = 1;
+ *bytes_consumed = 1;
return INVALID_CODEPOINT;
}
olen = 4 - olen;
@@ -1866,7 +1866,7 @@ codepoint_t next_codepoint_ext(const char *str, charset_t src_charset,
olen = 2 - olen;
}
- *size = ilen_orig - ilen;
+ *bytes_consumed = ilen_orig - ilen;
if (olen == 2) {
/* 2 byte, UTF16-LE encoded value. */