summaryrefslogtreecommitdiff
path: root/doio.c
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2019-09-06 10:25:26 -0600
committerKarl Williamson <khw@cpan.org>2019-12-26 14:02:25 -0700
commit25faa0d3730537ee32a3a4646abedc33b31e0d37 (patch)
tree03aa00e1a4f7fa6d6e0359a5143627601bbbfa71 /doio.c
parent5574513f9f50a19865b379d731a4ec7ae10fefa6 (diff)
downloadperl-25faa0d3730537ee32a3a4646abedc33b31e0d37.tar.gz
doio.c: Use inRANGE macro
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);