summaryrefslogtreecommitdiff
path: root/caretx.c
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2019-10-02 20:58:15 -0600
committerKarl Williamson <khw@cpan.org>2019-12-26 14:02:25 -0700
commit7682fe5fec76cd8da31a6ed2b86d7e9297e8f92f (patch)
tree560a79c8040a28ef5a7bf4b3858358686c5476e5 /caretx.c
parentb10c836bbf5082735e1853c06ef188bc950a317b (diff)
downloadperl-7682fe5fec76cd8da31a6ed2b86d7e9297e8f92f.tar.gz
caretx.c: Use inRANGE()
This is more efficient
Diffstat (limited to 'caretx.c')
-rw-r--r--caretx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/caretx.c b/caretx.c
index 247708de8c..fc5ff93c25 100644
--- a/caretx.c
+++ b/caretx.c
@@ -77,7 +77,7 @@ Perl_set_caret_X(pTHX) {
mib[3] = -1;
if (sysctl(mib, 4, NULL, &size, NULL, 0) == 0
- && size > 0 && size < MAXPATHLEN * MAXPATHLEN) {
+ && inRANGE(size, 1, -1 + MAXPATHLEN * MAXPATHLEN)) {
sv_grow(caret_x, size);
if (sysctl(mib, 4, SvPVX(caret_x), &size, NULL, 0) == 0