Skip to content

Commit

Permalink
locale.c: Use Strerror(), not strerror()
Browse files Browse the repository at this point in the history
  • Loading branch information
khwilliamson committed Apr 29, 2021
1 parent 9feeba9 commit 34d6f3b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions locale.c
Expand Up @@ -6554,13 +6554,13 @@ Perl_my_strerror(pTHX_ const int errnum)

/* This function is trivial without threads. */
if (within_locale_scope) {
errstr = savepv(strerror(errnum));
errstr = savepv(Strerror(errnum));
}
else {
const char * save_locale = savepv(querylocale_c(LC_MESSAGES));

void_setlocale_c(LC_MESSAGES, "C");
errstr = savepv(strerror(errnum));
errstr = savepv(Strerror(errnum));
void_setlocale_c(LC_MESSAGES, save_locale);
Safefree(save_locale);
}
Expand All @@ -6578,7 +6578,7 @@ Perl_my_strerror(pTHX_ const int errnum)
# ifdef HAS_STRERROR_R

if (within_locale_scope) {
errstr = savepv(strerror(errnum));
errstr = savepv(Strerror(errnum));
}
else {
errstr = savepv(strerror_l(errnum, PL_C_locale_obj));
Expand Down

0 comments on commit 34d6f3b

Please sign in to comment.