Skip to content

Commit 138753c

Browse files
author
Stefan Krah
authored
bpo-31275: Small refactoring to silence a fall-through warning. (#3206)
1 parent 9e1e6f5 commit 138753c

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

Modules/cjkcodecs/_codecs_iso2022.c

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -807,15 +807,9 @@ jisx0213_encoder(const Py_UCS4 *data, Py_ssize_t *length, void *config)
807807
case 2: /* second character of unicode pair */
808808
coded = find_pairencmap((ucs2_t)data[0], (ucs2_t)data[1],
809809
jisx0213_pair_encmap, JISX0213_ENCPAIRS);
810-
if (coded == DBCINV) {
811-
*length = 1;
812-
coded = find_pairencmap((ucs2_t)data[0], 0,
813-
jisx0213_pair_encmap, JISX0213_ENCPAIRS);
814-
if (coded == DBCINV)
815-
return MAP_UNMAPPABLE;
816-
}
817-
else
810+
if (coded != DBCINV)
818811
return coded;
812+
/* fall through */
819813

820814
case -1: /* flush unterminated */
821815
*length = 1;

0 commit comments

Comments
 (0)