summaryrefslogtreecommitdiff
path: root/iconvdata/ibm933.c
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2018-12-27 15:41:39 +0000
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2018-12-27 15:41:39 +0000
commit16c9ca827cd735002dec5689f93f22fc358d6f56 (patch)
treefbfaa8e020a3a762a96c4f219d4150e369e00099 /iconvdata/ibm933.c
parentdaa262720d3dc357a298b18a359551994082c9b3 (diff)
parent963c37d5c0eb62b38f8764b23931c0dcdd497a13 (diff)
Merge commit 'refs/top-bases/t/bits_atomic.h_multiple_threads' into t/bits_atomic.h_multiple_threadst/bits_atomic.h_multiple_threads
Diffstat (limited to 'iconvdata/ibm933.c')
-rw-r--r--iconvdata/ibm933.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/iconvdata/ibm933.c b/iconvdata/ibm933.c
index 669e357066..a426e8e008 100644
--- a/iconvdata/ibm933.c
+++ b/iconvdata/ibm933.c
@@ -1,5 +1,5 @@
/* Conversion from and to IBM933.
- Copyright (C) 2000-2016 Free Software Foundation, Inc.
+ Copyright (C) 2000-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Masahide Washizawa <washi@yamato.ibm.co.jp>, 2000.
@@ -189,7 +189,6 @@ enum
uint32_t ch = get32 (inptr); \
const struct gap *rp1 = __ucs4_to_ibm933sb_idx; \
const struct gap *rp2 = __ucs4_to_ibm933db_idx; \
- const char *cp; \
\
if (__glibc_unlikely (ch >= 0xffff)) \
{ \
@@ -202,14 +201,16 @@ enum
++rp1; \
\
/* Use the UCS4 table for single byte. */ \
+ unsigned char sbconv; \
if (__builtin_expect (ch < rp1->start, 0) \
- || (cp = __ucs4_to_ibm933sb[ch + rp1->idx], \
- __builtin_expect (cp[0], L'\1') == L'\0' && ch != '\0')) \
+ || (sbconv = __ucs4_to_ibm933sb[ch + rp1->idx], \
+ __builtin_expect (sbconv, L'\1') == L'\0' && ch != '\0')) \
{ \
/* Use the UCS4 table for double byte. */ \
while (ch > rp2->end) \
++rp2; \
\
+ const char *cp; \
if (__builtin_expect (ch < rp2->start, 0) \
|| (cp = __ucs4_to_ibm933db[ch + rp2->idx], \
__builtin_expect (cp[0], L'\1')==L'\0' && ch != '\0')) \
@@ -257,7 +258,7 @@ enum
result = __GCONV_FULL_OUTPUT; \
break; \
} \
- *outptr++ = cp[0]; \
+ *outptr++ = sbconv; \
} \
\
/* Now that we wrote the output increment the input pointer. */ \