summaryrefslogtreecommitdiff
path: root/st.c
diff options
context:
space:
mode:
Diffstat (limited to 'st.c')
-rw-r--r--st.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/st.c b/st.c
index 7a5509c..ec518e9 100644
--- a/st.c
+++ b/st.c
@@ -774,10 +774,10 @@ st_foreach(st_table *table, int (*func)(ANYARGS), st_data_t arg)
if ((ptr = table->head) != 0) {
do {
+ i = ptr->hash % table->num_bins;
retval = (*func)(ptr->key, ptr->record, arg);
switch (retval) {
case ST_CHECK: /* check if hash is modified during iteration */
- i = ptr->hash % table->num_bins;
for (tmp = table->bins[i]; tmp != ptr; tmp = tmp->next) {
if (!tmp) {
/* call func with error notice */