Skip to content

Commit

Permalink
locale.c: Skip code if will be a no-op
Browse files Browse the repository at this point in the history
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
  • Loading branch information
khwilliamson committed Sep 1, 2022
1 parent 3d3a0c7 commit 818cdb7
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions locale.c
Original file line number Diff line number Diff line change
Expand Up @@ -1696,13 +1696,13 @@ S_new_numeric(pTHX_ const char *newnum)
* such platforms.
*/


/* Save the new name if it isn't the same as the previous one, if any */
if (strNE(PL_numeric_name, newnum)) {
Safefree(PL_numeric_name);
PL_numeric_name = savepv(newnum);
if (strEQ(PL_numeric_name, newnum)) {
return;
}

Safefree(PL_numeric_name);
PL_numeric_name = savepv(newnum);

/* We are in the underlying locale until changed at the end of this
* function */
PL_numeric_underlying = TRUE;
Expand Down

0 comments on commit 818cdb7

Please sign in to comment.