Skip to content

Commit

Permalink
Storable: Save a '&' instr by casting to U8
Browse files Browse the repository at this point in the history
  • Loading branch information
khwilliamson committed Jul 24, 2021
1 parent 0ded09a commit 471e598
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dist/Storable/Storable.pm
Expand Up @@ -28,7 +28,7 @@ our @EXPORT_OK = qw(
our ($canonical, $forgive_me);

BEGIN {
our $VERSION = '3.23';
our $VERSION = '3.24';
}

our $recursion_limit;
Expand Down
2 changes: 1 addition & 1 deletion dist/Storable/Storable.xs
Expand Up @@ -1247,7 +1247,7 @@ static const char byteorderstr_56[] = {BYTEORDER_BYTES_56, 0};
# define Sntohl(x) (x)
# else
static U32 Sntohl(U32 x) {
return ((x & 0xFF) << 24) + ((x * 0xFF00) << 8)
return (((U8) x) << 24) + ((x * 0xFF00) << 8)
+ ((x & 0xFF0000) >> 8) + ((x & 0xFF000000) >> 24);
}
# endif
Expand Down

0 comments on commit 471e598

Please sign in to comment.