From 6c6eab558a00ed52629a7966596424346615a595 Mon Sep 17 00:00:00 2001 From: Karl Williamson Date: Mon, 9 Sep 2013 19:39:07 -0600 Subject: [PATCH] mg.c: Reorder if else clauses This is to allow two cases in the switch statement to be combined in the next commit. There should be no effective logic change --- mg.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/mg.c b/mg.c index 613a14e..1f494dc 100644 --- a/mg.c +++ b/mg.c @@ -788,7 +788,11 @@ Perl_magic_get(pTHX_ SV *sv, MAGIC *mg) sv_setiv(sv, (IV)(PL_debug & DEBUG_MASK)); break; case '\005': /* ^E */ - if (nextchar == '\0') { + if (nextchar != '\0') { + if (strEQ(remaining, "NCODING")) + sv_setsv(sv, PL_encoding); + } + else { #if defined(VMS) { char msg[255]; @@ -834,8 +838,6 @@ Perl_magic_get(pTHX_ SV *sv, MAGIC *mg) SvRTRIM(sv); SvNOK_on(sv); /* what a wonderful hack! */ } - else if (strEQ(remaining, "NCODING")) - sv_setsv(sv, PL_encoding); break; case '!': -- 1.8.3.1