summaryrefslogtreecommitdiff
path: root/perl.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2014-04-30 07:49:07 -0400
committerSteffen Mueller <smueller@cpan.org>2014-05-28 12:34:05 +0200
commitb7249aafbb0d9cb946690d715169cf26e3066ccb (patch)
treec27b0c9c44baf9a5344709fd5cc69387ff3aed8d /perl.c
parent4fa715fa94837500ba695881194771a669c480ff (diff)
downloadperl-b7249aafbb0d9cb946690d715169cf26e3066ccb.tar.gz
For ptr masking use PTRSIZE-1, not nested conditional statement.
Diffstat (limited to 'perl.c')
-rw-r--r--perl.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/perl.c b/perl.c
index 27d0d9e752..1b9b4292f4 100644
--- a/perl.c
+++ b/perl.c
@@ -1496,8 +1496,7 @@ perl_parse(pTHXx_ XSINIT_t xsinit, int argc, char **argv, char **env)
* --jhi */
const char *s = NULL;
int i;
- const UV mask =
- ~(UV)(PTRSIZE == 4 ? 3 : PTRSIZE == 8 ? 7 : PTRSIZE == 16 ? 15 : 0);
+ const UV mask = ~(UV)(PTRSIZE-1);
/* Do the mask check only if the args seem like aligned. */
const UV aligned =
(mask < ~(UV)0) && ((PTR2UV(argv[0]) & mask) == PTR2UV(argv[0]));