summaryrefslogtreecommitdiff
path: root/source4/heimdal/lib/wind/utf8.c
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2011-07-15 09:10:30 +0200
committerStefan Metzmacher <metze@samba.org>2011-07-15 11:15:05 +0200
commit255e3e18e00f717d99f3bc57c8a8895ff624f3c3 (patch)
treea2933c88f38e8dd7fe612be8dd458d05918b1f15 /source4/heimdal/lib/wind/utf8.c
parent70da27838bb3f6ed9c36add06ce0ccdf467ab1c3 (diff)
downloadsamba-255e3e18e00f717d99f3bc57c8a8895ff624f3c3.tar.gz
samba-255e3e18e00f717d99f3bc57c8a8895ff624f3c3.tar.bz2
samba-255e3e18e00f717d99f3bc57c8a8895ff624f3c3.zip
s4:heimdal: import lorikeet-heimdal-201107150856 (commit 48936803fae4a2fb362c79365d31f420c917b85b)
Diffstat (limited to 'source4/heimdal/lib/wind/utf8.c')
-rw-r--r--source4/heimdal/lib/wind/utf8.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source4/heimdal/lib/wind/utf8.c b/source4/heimdal/lib/wind/utf8.c
index d16683645c..6907b3c9d3 100644
--- a/source4/heimdal/lib/wind/utf8.c
+++ b/source4/heimdal/lib/wind/utf8.c
@@ -183,7 +183,7 @@ wind_ucs4utf8(const uint32_t *in, size_t in_len, char *out, size_t *out_len)
for (o = 0, i = 0; i < in_len; i++) {
ch = in[i];
-
+
if (ch < 0x80) {
len = 1;
} else if (ch < 0x800) {
@@ -194,7 +194,7 @@ wind_ucs4utf8(const uint32_t *in, size_t in_len, char *out, size_t *out_len)
len = 4;
} else
return WIND_ERR_INVALID_UTF32;
-
+
o += len;
if (out) {
@@ -341,7 +341,7 @@ wind_ucs2write(const uint16_t *in, size_t in_len, unsigned int *flags,
* first to the output data */
if ((*flags) & WIND_RW_BOM) {
uint16_t bom = 0xfffe;
-
+
if (len < 2)
return WIND_ERR_OVERRUN;
@@ -462,14 +462,14 @@ wind_ucs2utf8(const uint16_t *in, size_t in_len, char *out, size_t *out_len)
for (o = 0, i = 0; i < in_len; i++) {
ch = in[i];
-
+
if (ch < 0x80) {
len = 1;
} else if (ch < 0x800) {
len = 2;
} else
len = 3;
-
+
o += len;
if (out) {