summaryrefslogtreecommitdiff
path: root/pp_sys.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2014-03-02 09:50:38 +0100
committerNicholas Clark <nick@ccl4.org>2014-03-19 10:57:53 +0100
commitd5eb9a4687ba974ffd0d02aab53326c5aba6a9e0 (patch)
treeac42edbd4daada8d4b122daa07c4700ad8169abd /pp_sys.c
parent4b451737e0f77cc9e91b1336d04f21659d96b732 (diff)
downloadperl-d5eb9a4687ba974ffd0d02aab53326c5aba6a9e0.tar.gz
Change core uses of Perl_do_openn() to Perl_do_open6() or Perl_do_open_raw().
Calls to Perl_do_openn() all have at least 2 unused arguments which clutter the code and hinder easy understanding. Perl_do_open6() and Perl_do_open_raw() each only do one job, so don't have the dead arguments.
Diffstat (limited to 'pp_sys.c')
-rw-r--r--pp_sys.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/pp_sys.c b/pp_sys.c
index 01e397a0c1..9f971773f4 100644
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -638,7 +638,7 @@ PP(pp_open)
}
tmps = SvPV_const(sv, len);
- ok = do_openn(gv, tmps, len, FALSE, O_RDONLY, 0, NULL, MARK+1, (SP-MARK));
+ ok = do_open6(gv, tmps, len, NULL, MARK+1, (SP-MARK));
SP = ORIGMARK;
if (ok)
PUSHi( (I32)PL_forkprocess );
@@ -1598,8 +1598,7 @@ PP(pp_sysopen)
/* Need TIEHANDLE method ? */
const char * const tmps = SvPV_const(sv, len);
- /* FIXME? do_open should do const */
- if (do_open(gv, tmps, len, TRUE, mode, perm, NULL)) {
+ if (do_open_raw(gv, tmps, len, mode, perm)) {
IoLINES(GvIOp(gv)) = 0;
PUSHs(&PL_sv_yes);
}
@@ -2088,7 +2087,7 @@ PP(pp_eof)
if ((IoFLAGS(io) & IOf_START) && av_tindex(GvAVn(gv)) < 0) {
IoLINES(io) = 0;
IoFLAGS(io) &= ~IOf_START;
- do_open(gv, "-", 1, FALSE, O_RDONLY, 0, NULL);
+ do_open6(gv, "-", 1, NULL, NULL, 0);
if (GvSV(gv))
sv_setpvs(GvSV(gv), "-");
else