summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTAKAI Kousuke <62541129+t-a-k@users.noreply.github.com>2021-08-11 22:38:50 +0900
committerKarl Williamson <khw@cpan.org>2021-08-12 06:02:21 -0600
commit3e05d643b0c50d21c02db146b48decb3820ad736 (patch)
tree825ee586865466c6ee60468c750eb6f205312321
parent8d469d0ecbd06a993426de11b8feec551378525b (diff)
downloadperl-3e05d643b0c50d21c02db146b48decb3820ad736.tar.gz
Storable.xs: Fix a (possible) typo in byte-masking expression.
The containing function (Sntohl) seems to be never compiled because <perl.h> always defines HAS_NTOHL, so no visible change is expected.
-rw-r--r--dist/Storable/Storable.xs2
1 files changed, 1 insertions, 1 deletions
diff --git a/dist/Storable/Storable.xs b/dist/Storable/Storable.xs
index 30fd69fbec..d96f4fac3f 100644
--- a/dist/Storable/Storable.xs
+++ b/dist/Storable/Storable.xs
@@ -1247,7 +1247,7 @@ static const char byteorderstr_56[] = {BYTEORDER_BYTES_56, 0};
# define Sntohl(x) (x)
# else
static U32 Sntohl(U32 x) {
- return (((U8) x) << 24) + ((x * 0xFF00) << 8)
+ return (((U8) x) << 24) + ((x & 0xFF00) << 8)
+ ((x & 0xFF0000) >> 8) + ((x & 0xFF000000) >> 24);
}
# endif