summaryrefslogtreecommitdiffstats
path: root/gnu/usr.bin/perl/os2/os2.c
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/usr.bin/perl/os2/os2.c')
-rw-r--r--gnu/usr.bin/perl/os2/os2.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/gnu/usr.bin/perl/os2/os2.c b/gnu/usr.bin/perl/os2/os2.c
index 4ae39e7f2d7..a4f5015fb10 100644
--- a/gnu/usr.bin/perl/os2/os2.c
+++ b/gnu/usr.bin/perl/os2/os2.c
@@ -1140,6 +1140,7 @@ do_spawn_ve(pTHX_ SV *really, U32 flag, U32 execf, char *inicmd, U32 addflag)
if (!buf)
buf = ""; /* XXX Needed? */
if (!buf[0]) { /* Empty... */
+ struct stat statbuf;
PerlIO_close(file);
/* Special case: maybe from -Zexe build, so
there is an executable around (contrary to
@@ -1148,8 +1149,8 @@ do_spawn_ve(pTHX_ SV *really, U32 flag, U32 execf, char *inicmd, U32 addflag)
reached this place). */
sv_catpv(scrsv, ".exe");
PL_Argv[0] = scr = SvPV(scrsv, n_a); /* Reload */
- if (PerlLIO_stat(scr,&PL_statbuf) >= 0
- && !S_ISDIR(PL_statbuf.st_mode)) { /* Found */
+ if (PerlLIO_stat(scr,&statbuf) >= 0
+ && !S_ISDIR(statbuf.st_mode)) { /* Found */
real_name = scr;
pass++;
goto reread;
@@ -3855,7 +3856,7 @@ XS(XS_OS2__headerInfo)
if (size <= 0)
Perl_croak(aTHX_ "OS2::_headerInfo(): unexpected size: %d", (int)size);
- ST(0) = newSVpvn("",0);
+ ST(0) = newSVpvs("");
SvGROW(ST(0), size + 1);
sv_2mortal(ST(0));
@@ -3885,7 +3886,7 @@ XS(XS_OS2_libPath)
Perl_croak(aTHX_ "OS2::_headerInfo(%ld,%ld,%ld,%ld) error: %s",
DQHI_QUERYLIBPATHSIZE, sizeof(size), 0, 0,
os2error(Perl_rc));
- ST(0) = newSVpvn("",0);
+ ST(0) = newSVpvs("");
SvGROW(ST(0), size + 1);
sv_2mortal(ST(0));