summaryrefslogtreecommitdiff
path: root/doio.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2014-03-01 21:10:38 +0100
committerNicholas Clark <nick@ccl4.org>2014-03-19 10:57:52 +0100
commit7c491510e1dbbc37aae15850c893746a82211cf5 (patch)
treee1cb636c979400a91b72bcfda041fb88b5eb0baa /doio.c
parentc564b489757973ad664254ae00cf16880e1f7db5 (diff)
downloadperl-7c491510e1dbbc37aae15850c893746a82211cf5.tar.gz
Perl_do_openn() should call PerlIO_openn() with arg NULL if narg is 0.
If narg is NULL, then PerlIO_openn() doesn't look at args. (Technically except for PerlIOStdio_open() if f is non-NULL, which doesn't check narg and assumes that args[0] is valid. That lack of check is probably a bug. But it doesn't matter in this case, as f is NULL) This makes it clear that arg isn't needed at this point in Perl_do_openn(). This is a more complete version of the change made by commit dd37d22f759197ae (March 2002), which just changed the call to pass 0 for narg.
Diffstat (limited to 'doio.c')
-rw-r--r--doio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/doio.c b/doio.c
index da46367ad1..a02346264f 100644
--- a/doio.c
+++ b/doio.c
@@ -687,7 +687,7 @@ Perl_do_openn(pTHX_ GV *gv, const char *oname, I32 len, int as_raw,
if (*s == IoTYPE_IMPLICIT || *s == IoTYPE_NUMERIC)
s++;
*s = 'w';
- if (!(IoOFP(io) = PerlIO_openn(aTHX_ type,s,fd,0,0,NULL,0,svp))) {
+ if (!(IoOFP(io) = PerlIO_openn(aTHX_ type,s,fd,0,0,NULL,0,NULL))) {
PerlIO_close(fp);
IoIFP(io) = NULL;
goto say_false;