Skip to content

Commit da7aa25

Browse files
committed
locale.c: Reverse order of conditionals
Place the trivial case first; this also removes complementing the conditional. These make it easier to read
1 parent a7eccf4 commit da7aa25

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

locale.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8629,7 +8629,10 @@ S_strftime8(pTHX_ const char * fmt,
86298629

86308630
case UTF8NESS_YES: /* Known to be UTF-8; must be UTF-8 locale if can't
86318631
downgrade. */
8632-
if (! is_locale_utf8(locale)) {
8632+
if (is_locale_utf8(locale)) {
8633+
locale_utf8ness = LOCALE_IS_UTF8;
8634+
}
8635+
else {
86338636
locale_utf8ness = LOCALE_NOT_UTF8;
86348637

86358638
Size_t fmt_len = strlen(fmt);
@@ -8639,9 +8642,6 @@ S_strftime8(pTHX_ const char * fmt,
86398642
return false;
86408643
}
86418644
}
8642-
else {
8643-
locale_utf8ness = LOCALE_IS_UTF8;
8644-
}
86458645

86468646
break;
86478647

0 commit comments

Comments
 (0)