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 May 5, 2021
1 parent c99c644 commit cf7c121
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions locale.c
Expand Up @@ -1606,14 +1606,14 @@ S_new_numeric(pTHX_ const char *newnum)
*/


/* Save the new name if it isn't the same as the previous one, if any */
/* If this isn't actually a change, do nothing */
if (PL_numeric_name && strEQ(PL_numeric_name, newnum)) {
return;
}
else {

/* Save the locale name for future use */
Safefree(PL_numeric_name);
PL_numeric_name = savepv(newnum);
}

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

0 comments on commit cf7c121

Please sign in to comment.