This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Remove superfluous strlen() from pp_require().
authorNicholas Clark <nick@ccl4.org>
Wed, 9 Nov 2005 10:56:28 +0000 (10:56 +0000)
committerNicholas Clark <nick@ccl4.org>
Wed, 9 Nov 2005 10:56:28 +0000 (10:56 +0000)
p4raw-id: //depot/perl@26059

pp_ctl.c

index 71afbda..ed64242 100644 (file)
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -3313,10 +3313,8 @@ PP(pp_require)
     else
        SETERRNO(0, SS_NORMAL);
 
-    /* FIXME - is name ever assigned to after the SvPVX_const that also set
-       len?  If no, then this strlen() is superfluous.  */
     /* Assume success here to prevent recursive requirement. */
-    len = strlen(name);
+    /* name is never assigned to again, so len is still strlen(name)  */
     /* Check whether a hook in @INC has already filled %INC */
     if (!hook_sv) {
        (void)hv_store(GvHVn(PL_incgv), name, len, newSVpv(CopFILE(&PL_compiling),0),0);