This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Perl_scalar(): remove redundant switch labels
authorDavid Mitchell <davem@iabyn.com>
Tue, 28 May 2019 11:19:23 +0000 (12:19 +0100)
committerDavid Mitchell <davem@iabyn.com>
Mon, 24 Jun 2019 10:40:07 +0000 (11:40 +0100)
Remove some explicit cases that just do the same as 'default:'

op.c

diff --git a/op.c b/op.c
index 73e3044..35cb99b 100644 (file)
--- a/op.c
+++ b/op.c
@@ -1831,11 +1831,6 @@ Perl_scalar(pTHX_ OP *o)
            scalar(kid);
        break;
 
-    case OP_SPLIT:
-    case OP_MATCH:
-    case OP_QR:
-    case OP_SUBST:
-    case OP_NULL:
     default:
        if (o->op_flags & OPf_KIDS) {
            for (kid = cUNOPo->op_first; kid; kid = OpSIBLING(kid))