summaryrefslogtreecommitdiff
path: root/doio.c
diff options
context:
space:
mode:
authorDave Mitchell <davem@fdisolutions.com>2005-07-17 19:02:10 +0000
committerDave Mitchell <davem@fdisolutions.com>2005-07-17 19:02:10 +0000
commitce44635a98097a8f9f8acc0fc8393ebd5524dbdf (patch)
tree74c83e8100f34dc6f34953480c06a3f0f6b2769a /doio.c
parentace7757b19d04728dc05eefe7b371b14d8ce29dd (diff)
downloadperl-ce44635a98097a8f9f8acc0fc8393ebd5524dbdf.tar.gz
change #25129 was overzealous in delaying the call to ckWARN
p4raw-link: @25129 on //depot/perl: 041457d90dbb6fb79a72c7a8462f01423f2daa09 p4raw-id: //depot/perl@25159
Diffstat (limited to 'doio.c')
-rw-r--r--doio.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/doio.c b/doio.c
index 61a5371958..e9c40a7694 100644
--- a/doio.c
+++ b/doio.c
@@ -566,8 +566,9 @@ Perl_do_openn(pTHX_ GV *gv, register char *name, I32 len, int as_raw,
}
}
if (!fp) {
- if (IoTYPE(io) == IoTYPE_RDONLY && strchr(name, '\n')
- && ckWARN(WARN_NEWLINE)
+ if (IoTYPE(io) == IoTYPE_RDONLY && ckWARN(WARN_NEWLINE)
+ && strchr(name, '\n')
+
)
Perl_warner(aTHX_ packWARN(WARN_NEWLINE), PL_warn_nl, "open");
goto say_false;
@@ -1394,7 +1395,7 @@ Perl_my_stat(pTHX)
s = SvPVX_const(PL_statname); /* s now NUL-terminated */
PL_laststype = OP_STAT;
PL_laststatval = PerlLIO_stat(s, &PL_statcache);
- if (PL_laststatval < 0 && strchr(s, '\n') && ckWARN(WARN_NEWLINE))
+ if (PL_laststatval < 0 && ckWARN(WARN_NEWLINE) && strchr(s, '\n'))
Perl_warner(aTHX_ packWARN(WARN_NEWLINE), PL_warn_nl, "stat");
return PL_laststatval;
}