summaryrefslogtreecommitdiff
path: root/handy.h
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2016-03-03 10:59:57 +0000
committerDavid Mitchell <davem@iabyn.com>2016-03-04 21:07:54 +0000
commit004073bac990d90244eb463f435c52d4040b36df (patch)
tree6114ae926d623704d967737bf198e7875b2ae9c5 /handy.h
parentca76e4e9adfa1629d8fee4608cbeab9d9ba91ed3 (diff)
downloadperl-004073bac990d90244eb463f435c52d4040b36df.tar.gz
Simplify _MEM_WRAP_NEEDS_RUNTIME_CHECK()
And at the same time hopefully avoid some false-positive compiler warnings on HP-UX
Diffstat (limited to 'handy.h')
-rw-r--r--handy.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/handy.h b/handy.h
index 217708052e..570268130d 100644
--- a/handy.h
+++ b/handy.h
@@ -1942,8 +1942,7 @@ PoisonWith(0xEF) for catching access to freed memory.
*/
# define _MEM_WRAP_NEEDS_RUNTIME_CHECK(n,t) \
- ( sizeof(MEM_SIZE) < sizeof(n) \
- || sizeof(t) > ((MEM_SIZE)1 << 8*(sizeof(MEM_SIZE) - sizeof(n))))
+ (8 * sizeof(n) + sizeof(t) > sizeof(MEM_SIZE))
/* This is written in a slightly odd way to avoid various spurious
* compiler warnings. We *want* to write the expression as