summaryrefslogtreecommitdiff
path: root/iconvdata/ibm939.c
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2018-12-27 19:23:01 +0000
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2018-12-27 19:23:01 +0000
commit519f6620457d9f84d0125c0c7d01abebaae8efaa (patch)
tree28e2b20214b72aa7a633a5910dba7d2388620a78 /iconvdata/ibm939.c
parent74f331b3ccf81cf9404be03e62bde9efcc0878c2 (diff)
parent68e2fa8ed9dbf0edfdaed0310801e764c12af46e (diff)
Merge commit 'refs/top-bases/t/libc_cleanup' into t/libc_cleanup
Diffstat (limited to 'iconvdata/ibm939.c')
-rw-r--r--iconvdata/ibm939.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/iconvdata/ibm939.c b/iconvdata/ibm939.c
index c0a75f7797..0e44e91875 100644
--- a/iconvdata/ibm939.c
+++ b/iconvdata/ibm939.c
@@ -1,5 +1,5 @@
/* Conversion to and from IBM939.
- 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.
@@ -190,7 +190,6 @@ enum
uint32_t ch = get32 (inptr); \
const struct gap *rp1 = __ucs4_to_ibm939sb_idx; \
const struct gap *rp2 = __ucs4_to_ibm939db_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_ibm939sb[ch + rp1->idx], \
- __builtin_expect (cp[0], L'\1') == L'\0' && ch != '\0')) \
+ || (sbconv = __ucs4_to_ibm939sb[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_ibm939db[ch + rp2->idx], \
__builtin_expect (cp[0], L'\1')==L'\0' && ch != '\0')) \
@@ -263,7 +264,7 @@ enum
else if (ch == 0x5c) \
*outptr++ = 0xb2; \
else \
- *outptr++ = cp[0]; \
+ *outptr++ = sbconv; \
} \
\
/* Now that we wrote the output increment the input pointer. */ \