diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2014-04-30 07:49:07 -0400 |
---|---|---|
committer | Steffen Mueller <smueller@cpan.org> | 2014-05-28 12:34:05 +0200 |
commit | b7249aafbb0d9cb946690d715169cf26e3066ccb (patch) | |
tree | c27b0c9c44baf9a5344709fd5cc69387ff3aed8d /perl.c | |
parent | 4fa715fa94837500ba695881194771a669c480ff (diff) | |
download | perl-b7249aafbb0d9cb946690d715169cf26e3066ccb.tar.gz |
For ptr masking use PTRSIZE-1, not nested conditional statement.
Diffstat (limited to 'perl.c')
-rw-r--r-- | perl.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -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])); |