summaryrefslogtreecommitdiff
path: root/op.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2012-11-23 20:40:39 -0800
committerFather Chrysostomos <sprout@cpan.org>2012-11-24 07:35:50 -0800
commit7e18702058e5564da44e84546c67056637b62d83 (patch)
tree991f7065a3abcbaab154bb183a4f726ec319e727 /op.c
parent8daf8916b49984fc91791e8265cd7e1ca36b836c (diff)
downloadperl-7e18702058e5564da44e84546c67056637b62d83.tar.gz
op.c:newATTRSUB: Change an if condition to an else
In one spot we have if(blah blah balh) {...} followed by if (<exactly the opposite>). We can just change the second if to an else, since the condition is not going to change here. This brings newATTRSUB and newMYSUB slightly closer, allowing me to factor some of it out into a static routine in the next commit.
Diffstat (limited to 'op.c')
-rw-r--r--op.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/op.c b/op.c
index aedf54f536..0e287e1202 100644
--- a/op.c
+++ b/op.c
@@ -7464,11 +7464,7 @@ Perl_newATTRSUB_flags(pTHX_ I32 floor, OP *o, OP *proto, OP *attrs,
SAVEFREESV(PL_compcv);
goto done;
}
- if (block
-#ifdef PERL_MAD
- && block->op_type != OP_NULL
-#endif
- ) {
+ else {
const line_t oldline = CopLINE(PL_curcop);
if (PL_parser && PL_parser->copline != NOLINE) {
/* This ensures that warnings are reported at the first