Skip to content

Commit 818cdb7

Browse files
committed
locale.c: Skip code if will be a no-op
The previous commits have fixed things up so that at this point in the code nothing has changed, and if nothing will change, we can just return
1 parent 3d3a0c7 commit 818cdb7

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

locale.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1696,13 +1696,13 @@ S_new_numeric(pTHX_ const char *newnum)
16961696
* such platforms.
16971697
*/
16981698

1699-
1700-
/* Save the new name if it isn't the same as the previous one, if any */
1701-
if (strNE(PL_numeric_name, newnum)) {
1702-
Safefree(PL_numeric_name);
1703-
PL_numeric_name = savepv(newnum);
1699+
if (strEQ(PL_numeric_name, newnum)) {
1700+
return;
17041701
}
17051702

1703+
Safefree(PL_numeric_name);
1704+
PL_numeric_name = savepv(newnum);
1705+
17061706
/* We are in the underlying locale until changed at the end of this
17071707
* function */
17081708
PL_numeric_underlying = TRUE;

0 commit comments

Comments
 (0)