This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
regcomp.c: Move code into a function
[perl5.git] / zaphod32_hash.h
index 31dd153..c9b60cc 100644 (file)
@@ -218,7 +218,7 @@ U32 zaphod32_hash_with_state(
     STRLEN len = key_len;
     U32 v0= state[0];
     U32 v1= state[1];
-    U32 v2= state[2] ^ (0xC41A7AB1 * (key_len + 1));
+    U32 v2= state[2] ^ (0xC41A7AB1 * ((U32)key_len + 1));
 
     ZAPHOD32_WARN4("v0=%08x v1=%08x v2=%08x ln=%08x HASH START\n",
             (unsigned int)state[0], (unsigned int)state[1],
@@ -269,7 +269,10 @@ U32 zaphod32_hash_with_state(
         return v0 ^ v2;
     }
 
-    if (len >= 8) {
+/*  if (len >= 8) */ /* this block is only reached by a goto above, so this condition
+                        is commented out, but if the above block is removed it would
+                        be necessary to use this. */
+    {
 zaphod32_read8:
         len = key_len & 0x7;
         end = key + key_len - len;