@@ -768,7 +768,7 @@ rebuild_table(st_table *tab)
768
768
}
769
769
770
770
/* Return the next secondary hash index for table TAB using previous
771
- index IND and PERTERB . Finally modulo of the function becomes a
771
+ index IND and PERTURB . Finally modulo of the function becomes a
772
772
full *cycle linear congruential generator*, in other words it
773
773
guarantees traversing all table bins in extreme case.
774
774
@@ -780,10 +780,10 @@ rebuild_table(st_table *tab)
780
780
781
781
For our case a is 5, c is 1, and m is a power of two. */
782
782
static inline st_index_t
783
- secondary_hash (st_index_t ind , st_table * tab , st_index_t * perterb )
783
+ secondary_hash (st_index_t ind , st_table * tab , st_index_t * perturb )
784
784
{
785
- * perterb >>= 11 ;
786
- ind = (ind << 2 ) + ind + * perterb + 1 ;
785
+ * perturb >>= 11 ;
786
+ ind = (ind << 2 ) + ind + * perturb + 1 ;
787
787
return hash_bin (ind , tab );
788
788
}
789
789
@@ -826,7 +826,7 @@ find_table_entry_ind(st_table *tab, st_hash_t hash_value, st_data_t key)
826
826
#ifdef QUADRATIC_PROBE
827
827
st_index_t d ;
828
828
#else
829
- st_index_t peterb ;
829
+ st_index_t perturb ;
830
830
#endif
831
831
st_index_t bin ;
832
832
st_table_entry * entries = tab -> entries ;
@@ -835,7 +835,7 @@ find_table_entry_ind(st_table *tab, st_hash_t hash_value, st_data_t key)
835
835
#ifdef QUADRATIC_PROBE
836
836
d = 1 ;
837
837
#else
838
- peterb = hash_value ;
838
+ perturb = hash_value ;
839
839
#endif
840
840
FOUND_BIN ;
841
841
for (;;) {
@@ -853,7 +853,7 @@ find_table_entry_ind(st_table *tab, st_hash_t hash_value, st_data_t key)
853
853
ind = hash_bin (ind + d , tab );
854
854
d ++ ;
855
855
#else
856
- ind = secondary_hash (ind , tab , & peterb );
856
+ ind = secondary_hash (ind , tab , & perturb );
857
857
#endif
858
858
COLLISION ;
859
859
}
@@ -872,7 +872,7 @@ find_table_bin_ind(st_table *tab, st_hash_t hash_value, st_data_t key)
872
872
#ifdef QUADRATIC_PROBE
873
873
st_index_t d ;
874
874
#else
875
- st_index_t peterb ;
875
+ st_index_t perturb ;
876
876
#endif
877
877
st_index_t bin ;
878
878
st_table_entry * entries = tab -> entries ;
@@ -881,7 +881,7 @@ find_table_bin_ind(st_table *tab, st_hash_t hash_value, st_data_t key)
881
881
#ifdef QUADRATIC_PROBE
882
882
d = 1 ;
883
883
#else
884
- peterb = hash_value ;
884
+ perturb = hash_value ;
885
885
#endif
886
886
FOUND_BIN ;
887
887
for (;;) {
@@ -899,7 +899,7 @@ find_table_bin_ind(st_table *tab, st_hash_t hash_value, st_data_t key)
899
899
ind = hash_bin (ind + d , tab );
900
900
d ++ ;
901
901
#else
902
- ind = secondary_hash (ind , tab , & peterb );
902
+ ind = secondary_hash (ind , tab , & perturb );
903
903
#endif
904
904
COLLISION ;
905
905
}
@@ -916,15 +916,15 @@ find_table_bin_ind_direct(st_table *tab, st_hash_t hash_value, st_data_t key)
916
916
#ifdef QUADRATIC_PROBE
917
917
st_index_t d ;
918
918
#else
919
- st_index_t peterb ;
919
+ st_index_t perturb ;
920
920
#endif
921
921
st_index_t bin ;
922
922
923
923
ind = hash_bin (hash_value , tab );
924
924
#ifdef QUADRATIC_PROBE
925
925
d = 1 ;
926
926
#else
927
- peterb = hash_value ;
927
+ perturb = hash_value ;
928
928
#endif
929
929
FOUND_BIN ;
930
930
for (;;) {
@@ -935,7 +935,7 @@ find_table_bin_ind_direct(st_table *tab, st_hash_t hash_value, st_data_t key)
935
935
ind = hash_bin (ind + d , tab );
936
936
d ++ ;
937
937
#else
938
- ind = secondary_hash (ind , tab , & peterb );
938
+ ind = secondary_hash (ind , tab , & perturb );
939
939
#endif
940
940
COLLISION ;
941
941
}
@@ -960,7 +960,7 @@ find_table_bin_ptr_and_reserve(st_table *tab, st_hash_t *hash_value,
960
960
#ifdef QUADRATIC_PROBE
961
961
st_index_t d ;
962
962
#else
963
- st_index_t peterb ;
963
+ st_index_t perturb ;
964
964
#endif
965
965
st_index_t entry_index ;
966
966
st_index_t first_deleted_bin_ind ;
@@ -970,7 +970,7 @@ find_table_bin_ptr_and_reserve(st_table *tab, st_hash_t *hash_value,
970
970
#ifdef QUADRATIC_PROBE
971
971
d = 1 ;
972
972
#else
973
- peterb = curr_hash_value ;
973
+ perturb = curr_hash_value ;
974
974
#endif
975
975
FOUND_BIN ;
976
976
first_deleted_bin_ind = UNDEFINED_BIN_IND ;
@@ -1000,7 +1000,7 @@ find_table_bin_ptr_and_reserve(st_table *tab, st_hash_t *hash_value,
1000
1000
ind = hash_bin (ind + d , tab );
1001
1001
d ++ ;
1002
1002
#else
1003
- ind = secondary_hash (ind , tab , & peterb );
1003
+ ind = secondary_hash (ind , tab , & perturb );
1004
1004
#endif
1005
1005
COLLISION ;
1006
1006
}
@@ -2120,7 +2120,7 @@ st_rehash_indexed(st_table *tab)
2120
2120
#ifdef QUADRATIC_PROBE
2121
2121
st_index_t d = 1 ;
2122
2122
#else
2123
- st_index_t peterb = p -> hash ;
2123
+ st_index_t perturb = p -> hash ;
2124
2124
#endif
2125
2125
2126
2126
if (DELETED_ENTRY_P (p ))
@@ -2153,7 +2153,7 @@ st_rehash_indexed(st_table *tab)
2153
2153
ind = hash_bin (ind + d , tab );
2154
2154
d ++ ;
2155
2155
#else
2156
- ind = secondary_hash (ind , tab , & peterb );
2156
+ ind = secondary_hash (ind , tab , & perturb );
2157
2157
#endif
2158
2158
}
2159
2159
}
0 commit comments