X-Git-Url: https://perl5.git.perl.org/perl5.git/blobdiff_plain/ace7757b19d04728dc05eefe7b371b14d8ce29dd..ce44635a98097a8f9f8acc0fc8393ebd5524dbdf:/doio.c?ds=sidebyside diff --git a/doio.c b/doio.c index 61a5371..e9c40a7 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; }