diff options
author | Stefan Krah <skrah@bytereef.org> | 2017-08-25 16:31:22 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-25 16:31:22 (GMT) |
commit | 138753c1b96b5e06a5c5d409fa4cae5e2fe1108b (patch) | |
tree | 48f3514ed1ec595dd9953fe87381d51aef94d176 /Modules/cjkcodecs | |
parent | 9e1e6f528f3fec16b9bd99f5ee38048ffec04a81 (diff) | |
download | cpython-138753c1b96b5e06a5c5d409fa4cae5e2fe1108b.zip cpython-138753c1b96b5e06a5c5d409fa4cae5e2fe1108b.tar.gz cpython-138753c1b96b5e06a5c5d409fa4cae5e2fe1108b.tar.bz2 |
bpo-31275: Small refactoring to silence a fall-through warning. (#3206)
Diffstat (limited to 'Modules/cjkcodecs')
-rw-r--r-- | Modules/cjkcodecs/_codecs_iso2022.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/Modules/cjkcodecs/_codecs_iso2022.c b/Modules/cjkcodecs/_codecs_iso2022.c index 1ce4218..7394cf6 100644 --- a/Modules/cjkcodecs/_codecs_iso2022.c +++ b/Modules/cjkcodecs/_codecs_iso2022.c @@ -807,15 +807,9 @@ jisx0213_encoder(const Py_UCS4 *data, Py_ssize_t *length, void *config) case 2: /* second character of unicode pair */ coded = find_pairencmap((ucs2_t)data[0], (ucs2_t)data[1], jisx0213_pair_encmap, JISX0213_ENCPAIRS); - if (coded == DBCINV) { - *length = 1; - coded = find_pairencmap((ucs2_t)data[0], 0, - jisx0213_pair_encmap, JISX0213_ENCPAIRS); - if (coded == DBCINV) - return MAP_UNMAPPABLE; - } - else + if (coded != DBCINV) return coded; + /* fall through */ case -1: /* flush unterminated */ *length = 1; |