aboutsummaryrefslogtreecommitdiffstats
path: root/st.c
diff options
context:
space:
mode:
Diffstat (limited to 'st.c')
-rw-r--r--st.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/st.c b/st.c
index 117f582703..4c6e5092b2 100644
--- a/st.c
+++ b/st.c
@@ -843,16 +843,10 @@ st_update(st_table *table, st_data_t key, st_update_callback_func *func, st_data
switch (retval) {
case ST_CONTINUE:
if (!existing) {
- if (key != old_key) hash_val = do_hash(key, table);
add_packed_direct(table, key, value, hash_val);
break;
}
- if (old_key != PKEY(table, i)) return -1;
if (old_key != key) {
- if (do_hash(key, table) != hash_val &&
- !EQUAL(table, key, old_key)) {
- return -1;
- }
PKEY(table, i) = key;
}
PVAL_SET(table, i, value);
@@ -879,16 +873,10 @@ st_update(st_table *table, st_data_t key, st_update_callback_func *func, st_data
switch (retval) {
case ST_CONTINUE:
if (!existing) {
- if (key != old_key) hash_val = do_hash(key, table);
add_direct(table, key, value, hash_val, hash_pos(hash_val, table->num_bins));
break;
}
- if (old_key != ptr->key) return -1;
if (old_key != key) {
- if (do_hash(key, table) != hash_val &&
- !EQUAL(table, key, old_key)) {
- return -1;
- }
ptr->key = key;
}
ptr->record = value;