summaryrefslogtreecommitdiff
path: root/locale.c
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2017-07-23 22:28:30 -0600
committerKarl Williamson <khw@cpan.org>2017-08-12 22:53:11 -0600
commit6affbbf0c5da73de79daa8090d9e831997d2828a (patch)
treefc1d62c71dd185c581ee50602f9d95dca6fafade /locale.c
parent5acc3fa5267fc7ad812f1bcfa7638acb4fd45c13 (diff)
downloadperl-6affbbf0c5da73de79daa8090d9e831997d2828a.tar.gz
locale.c: Move some DEBUGGING code
This is moved so it gets executed for all branches.
Diffstat (limited to 'locale.c')
-rw-r--r--locale.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/locale.c b/locale.c
index d062e855ea..58a0d58bbd 100644
--- a/locale.c
+++ b/locale.c
@@ -2791,16 +2791,6 @@ Perl_my_strerror(pTHX_ const int errnum)
errstr = Strerror(errnum);
if (errstr) {
-#ifdef DEBUGGING
-
- if (DEBUG_Lv_TEST) {
- PerlIO_printf(Perl_debug_log, "Strerror returned; saving a copy: '");
- print_bytes_for_locale(errstr, errstr + strlen(errstr), 0);
- PerlIO_printf(Perl_debug_log, "'\n");
- }
-
-#endif
-
errstr = savepv(errstr);
SAVEFREEPV(errstr);
}
@@ -2835,6 +2825,15 @@ Perl_my_strerror(pTHX_ const int errnum)
LOCALE_UNLOCK;
# endif
+
+#ifdef DEBUGGING
+
+ if (DEBUG_Lv_TEST) {
+ PerlIO_printf(Perl_debug_log, "Strerror returned; saving a copy: '");
+ print_bytes_for_locale(errstr, errstr + strlen(errstr), 0);
+ PerlIO_printf(Perl_debug_log, "'\n");
+ }
+
#endif
return errstr;