summaryrefslogtreecommitdiff
path: root/perl.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2009-02-22 23:17:47 +0100
committerNicholas Clark <nick@ccl4.org>2009-02-22 23:17:47 +0100
commit08d0d8ab11be611f4baf746cfb6ff7791962f494 (patch)
tree70a57bd0eb838277d56a86391bba3e8c3c84f87c /perl.c
parent7ffdaae673354e3b3ebbecaecdc009fee9fa90e7 (diff)
downloadperl-08d0d8ab11be611f4baf746cfb6ff7791962f494.tar.gz
For S_incpush(), dir is never NULL, and len is always > 0.
Diffstat (limited to 'perl.c')
-rw-r--r--perl.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/perl.c b/perl.c
index 9f7c68268f..7f983516e5 100644
--- a/perl.c
+++ b/perl.c
@@ -4358,13 +4358,13 @@ S_incpush(pTHX_ const char *const dir, STRLEN len, U32 flags)
const U8 canrelocate = (U8)flags & INCPUSH_CAN_RELOCATE;
const U8 unshift = (U8)flags & INCPUSH_UNSHIFT;
const U8 push_basedir = (flags & INCPUSH_NOT_BASEDIR) ? 0 : 1;
- AV *inc;
+ AV *const inc = GvAVn(PL_incgv);
- if (!dir || !*dir)
- return;
-
- inc = GvAVn(PL_incgv);
+ PERL_ARGS_ASSERT_INCPUSH;
+ assert(len > 0);
+ /* Could remove this vestigial extra block, if we don't mind a lot of
+ re-indenting diff noise. */
{
SV *libdir;
/* Change 20189146be79a0596543441fa369c6bf7f85103f, to fix RT#6665,