diff options
author | Nicholas Clark <nick@ccl4.org> | 2010-11-17 10:58:46 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2010-11-17 10:58:46 +0000 |
commit | 61c5492ade04e0e4885f062e63c9f5d91f769541 (patch) | |
tree | b9100386914613db9500a6daba46b4e1b0ff8be6 /pad.c | |
parent | 7bff8c334b79055a65ea37cb51de6d9629880b6c (diff) | |
download | perl-61c5492ade04e0e4885f062e63c9f5d91f769541.tar.gz |
In S_pad_check_dup(), no need to check the 0th name entry.
The 0th entry in a pad is for @_, and the name corresponding to it is NULL,
so save a check.
Diffstat (limited to 'pad.c')
-rw-r--r-- | pad.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -662,7 +662,7 @@ S_pad_check_dup(pTHX_ SV *name, const U32 flags, const HV *ourstash) } /* check the rest of the pad */ if (is_our) { - do { + while (off > 0) { SV * const sv = svp[off]; if (sv && sv != &PL_sv_undef @@ -678,7 +678,8 @@ S_pad_check_dup(pTHX_ SV *name, const U32 flags, const HV *ourstash) "\t(Did you mean \"local\" instead of \"our\"?)\n"); break; } - } while ( off-- > 0 ); + --off; + } } } |