summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCraig A. Berry <craigberry@mac.com>2011-12-03 15:55:26 -0600
committerCraig A. Berry <craigberry@mac.com>2012-10-25 08:16:04 -0500
commit0749edf595e84e7ada86c2de826c6629f6bec1a3 (patch)
tree45a4ad4ad2635e85f0f54823f48338f40dbbf5b3
parentbf6dd99808e8374451dc7a8df22648cef77bc006 (diff)
downloadperl-0749edf595e84e7ada86c2de826c6629f6bec1a3.tar.gz
Remove the VMS-specific private len in S_mayberelocate.
This particular C<STRLEN len;> came along almost 15 years ago, way back in aa6893958c2b. Back then it was a plain and simple block scope variable. But now this code lives in a function that takes as an argument a variable of the same name and having the same meaning (i.e., the length of the directory name to be added to @INC). Someone looking only at the argument list might reasonably expect to be able to use len (though luckily there are no subsequent uses of it currently). So we really ought to update that len rather than create our own when we hijack the directory name to make our unixified version of it.
-rw-r--r--perl.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/perl.c b/perl.c
index 0ba5bac6af..fb2c408964 100644
--- a/perl.c
+++ b/perl.c
@@ -4422,7 +4422,6 @@ S_mayberelocate(pTHX_ const char *const dir, STRLEN len, U32 flags)
#ifdef VMS
{
char *unix;
- STRLEN len;
if ((unix = tounixspec_ts(SvPV(libdir,len),NULL)) != NULL) {
len = strlen(unix);
@@ -4432,7 +4431,7 @@ S_mayberelocate(pTHX_ const char *const dir, STRLEN len, U32 flags)
else
PerlIO_printf(Perl_error_log,
"Failed to unixify @INC element \"%s\"\n",
- SvPV(libdir,len));
+ SvPV_nolen_const(libdir));
}
#endif