summaryrefslogtreecommitdiff
path: root/hv.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2014-05-13 08:18:05 -0400
committerSteffen Mueller <smueller@cpan.org>2014-05-28 15:20:53 +0200
commit3f49e765225af085951605f8b1c60eadd98ef39f (patch)
tree83af6cce0bfc6723a2cc4e6ca263b50c2fead294 /hv.c
parent461a975bd8196c522aeb2e0a06eb6980c25ffa2e (diff)
downloadperl-3f49e765225af085951605f8b1c60eadd98ef39f.tar.gz
Cannot rotl u32 (hek_hash) by 64 bits.
Fix for Coverity perl5 CID 28935: Operands don't affect result (CONSTANT_EXPRESSION_RESULT) result_independent_of_operands: (unsigned long)entry->hent_hek->hek_hash >> 47 /* 64 - 17 */ is 0 regardless of the values of its operands. This occurs as the bitwise second operand of '|'.
Diffstat (limited to 'hv.c')
-rw-r--r--hv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hv.c b/hv.c
index ef686ab704..4577363912 100644
--- a/hv.c
+++ b/hv.c
@@ -1259,7 +1259,7 @@ S_hsplit(pTHX_ HV *hv, STRLEN const oldsize, STRLEN newsize)
* and use the new low bit to decide if we insert at top,
* or next from top. IOW, we only rotate on a collision.*/
if (aep[j] && PL_HASH_RAND_BITS_ENABLED) {
- PL_hash_rand_bits+= ROTL_UV(HeHASH(entry), 17);
+ PL_hash_rand_bits+= ROTL32(HeHASH(entry), 17);
PL_hash_rand_bits= ROTL_UV(PL_hash_rand_bits,1);
if (PL_hash_rand_bits & 1) {
HeNEXT(entry)= HeNEXT(aep[j]);