diff options
author | Karl Williamson <khw@cpan.org> | 2017-07-23 22:28:30 -0600 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2017-08-12 22:53:11 -0600 |
commit | 6affbbf0c5da73de79daa8090d9e831997d2828a (patch) | |
tree | fc1d62c71dd185c581ee50602f9d95dca6fafade /locale.c | |
parent | 5acc3fa5267fc7ad812f1bcfa7638acb4fd45c13 (diff) | |
download | perl-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.c | 19 |
1 files changed, 9 insertions, 10 deletions
@@ -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; |