summaryrefslogtreecommitdiff
path: root/perl.c
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>2000-02-07 09:46:11 +0000
committerGurusamy Sarathy <gsar@cpan.org>2000-02-07 09:46:11 +0000
commit8353b874e0f557f50e91f1a509c06c2aadde1f0c (patch)
tree2afcd0e016640834905c905faeaff3268d96095c /perl.c
parent29d82f8db02520fbd9de7355b9f87859201d969b (diff)
downloadperl-8353b874e0f557f50e91f1a509c06c2aadde1f0c.tar.gz
NULL-terminate PERL_INC_VERSION_LIST
p4raw-id: //depot/perl@5019
Diffstat (limited to 'perl.c')
-rw-r--r--perl.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/perl.c b/perl.c
index ebb76a6f2d..931e592c76 100644
--- a/perl.c
+++ b/perl.c
@@ -3187,7 +3187,8 @@ S_incpush(pTHX_ char *p, int addsubdirs)
*/
if (addsubdirs) {
#ifdef PERL_INC_VERSION_LIST
- const char *incverlist[] = { PERL_INC_VERSION_LIST, NULL };
+ /* Configure terminates PERL_INC_VERSION_LIST with a NULL */
+ const char *incverlist[] = { PERL_INC_VERSION_LIST };
const char **incver;
#endif
struct stat tmpstatbuf;
@@ -3222,14 +3223,12 @@ S_incpush(pTHX_ char *p, int addsubdirs)
av_push(GvAVn(PL_incgv), newSVsv(subdir));
#ifdef PERL_INC_VERSION_LIST
- for (incver = incverlist; *incver; incver++)
- {
+ for (incver = incverlist; *incver; incver++) {
/* .../xxx if -d .../xxx */
Perl_sv_setpvf(aTHX_ subdir, "%"SVf"/%s", libdir, *incver);
if (PerlLIO_stat(SvPVX(subdir), &tmpstatbuf) >= 0 &&
S_ISDIR(tmpstatbuf.st_mode))
av_push(GvAVn(PL_incgv), newSVsv(subdir));
-
}
#endif
}