This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
fixup defines for SBOX mode
authorYves Orton <demerphq@gmail.com>
Fri, 2 Jun 2017 02:13:47 +0000 (04:13 +0200)
committerYves Orton <demerphq@gmail.com>
Fri, 2 Jun 2017 03:14:14 +0000 (05:14 +0200)
hv_func.h

index da37442..8230fb4 100644 (file)
--- a/hv_func.h
+++ b/hv_func.h
@@ -73,7 +73,7 @@
 #endif
 
 
-#if PERL_HASH_USE_SBOX32_ALSO == 1
+#if PERL_HASH_USE_SBOX32_ALSO != 1
 # define _PERL_HASH_FUNC                        __PERL_HASH_FUNC
 # define _PERL_HASH_SEED_BYTES                  __PERL_HASH_SEED_BYTES
 # define _PERL_HASH_STATE_BYTES                 __PERL_HASH_STATE_BYTES
 #define _PERL_HASH_SEED_BYTES   ( __PERL_HASH_SEED_BYTES + ( 3 * sizeof(U32) ) )
 
 #define _PERL_HASH_STATE_BYTES  \
-    ( __PERL_HASH_SEED_BYTES + ( ( 1 + ( 256 * SBOX32_MAX_LEN ) ) * sizeof(U32) ) )
+    ( __PERL_HASH_STATE_BYTES + ( ( 1 + ( 256 * SBOX32_MAX_LEN ) ) * sizeof(U32) ) )
 
 #define _PERL_HASH_SEED_STATE(seed,state) STMT_START {                                      \
     __PERL_HASH_SEED_STATE(seed,state);                                                     \
-    sbox32_seed_state96(seed + __PERL_HASH_SEED_BYTES , state + __PERL_HASH_STATE_BYTES);   \
+    sbox32_seed_state96(seed + __PERL_HASH_SEED_BYTES, state + __PERL_HASH_STATE_BYTES);    \
 } STMT_END
 
 #define _PERL_HASH_WITH_STATE(state,str,len)                                            \