summaryrefslogtreecommitdiff
path: root/op.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2013-06-28 00:09:02 -0700
committerFather Chrysostomos <sprout@cpan.org>2013-06-28 00:09:02 -0700
commit38d27505c65e77f92cb8e231db1ac56a3dee8f57 (patch)
tree48f6f91b804668aed8701b4243f63150ab44b697 /op.c
parentb17a067929304f6d2e8d21b1afec3c13df924d29 (diff)
downloadperl-38d27505c65e77f92cb8e231db1ac56a3dee8f57.tar.gz
op.c:cv_ckproto_len_flags: do null checks first
Checking local variables for nullness is faster than calling ckWARN_d, which involves a function call.
Diffstat (limited to 'op.c')
-rw-r--r--op.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/op.c b/op.c
index 7b11d1e77b..f96601860e 100644
--- a/op.c
+++ b/op.c
@@ -6816,10 +6816,10 @@ Perl_cv_ckproto_len_flags(pTHX_ const CV *cv, const GV *gv, const char *p,
PERL_ARGS_ASSERT_CV_CKPROTO_LEN_FLAGS;
- if (!ckWARN_d(WARN_PROTOTYPE))
+ if (p == NULL && cvp == NULL)
return;
- if (p == NULL && cvp == NULL)
+ if (!ckWARN_d(WARN_PROTOTYPE))
return;
if (p && cvp) {