This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
regcomp.c: Refactor to remove an else and a NOT_REACHED
authorKarl Williamson <khw@cpan.org>
Thu, 8 Nov 2018 03:07:51 +0000 (20:07 -0700)
committerKarl Williamson <khw@cpan.org>
Fri, 16 Nov 2018 16:39:07 +0000 (09:39 -0700)
This just simplifies things a bit.

regcomp.c

index 2f72faf..98effa2 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -8603,11 +8603,9 @@ S_reg_scan_name(pTHX_ RExC_state_t *pRExC_state, U32 flags)
         }
         return sv_dat;
     }
-    else {
-        Perl_croak(aTHX_ "panic: bad flag %lx in reg_scan_name",
-                   (unsigned long) flags);
-    }
-    NOT_REACHED; /* NOTREACHED */
+
+    Perl_croak(aTHX_ "panic: bad flag %lx in reg_scan_name",
+                     (unsigned long) flags);
 }
 
 #define DEBUG_PARSE_MSG(funcname)     DEBUG_PARSE_r({           \