diff options
author | Dave Mitchell <davem@fdisolutions.com> | 2005-07-17 19:02:10 +0000 |
---|---|---|
committer | Dave Mitchell <davem@fdisolutions.com> | 2005-07-17 19:02:10 +0000 |
commit | 0f1053425db7e150e18310f0b6713c10b3146ff2 (patch) | |
tree | 74c83e8100f34dc6f34953480c06a3f0f6b2769a /doio.c | |
parent | 9888ed3403dc11c32af7cc5e6e346ed6dabb458f (diff) | |
download | perl-0f1053425db7e150e18310f0b6713c10b3146ff2.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.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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; } |