summaryrefslogtreecommitdiff
path: root/doio.c
diff options
context:
space:
mode:
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 c57750e942..9bbf2a4c57 100644
--- a/doio.c
+++ b/doio.c
@@ -384,7 +384,7 @@ S_openn_setup(pTHX_ GV *gv, char *mode, PerlIO **saveifp, PerlIO **saveofp,
else {
const int old_fd = PerlIO_fileno(IoIFP(io));
- if (old_fd >= 0 && old_fd <= PL_maxsysfd) {
+ if (inRANGE(old_fd, 0, PL_maxsysfd)) {
/* This is one of the original STD* handles */
*saveifp = IoIFP(io);
*saveofp = IoOFP(io);