aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/program/hash_table.c
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/mesa/program/hash_table.c')
-rw-r--r--mesalib/src/mesa/program/hash_table.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/mesalib/src/mesa/program/hash_table.c b/mesalib/src/mesa/program/hash_table.c
index dc8563a33..7dabadc50 100644
--- a/mesalib/src/mesa/program/hash_table.c
+++ b/mesalib/src/mesa/program/hash_table.c
@@ -149,7 +149,7 @@ hash_table_insert(struct hash_table *ht, void *data, const void *key)
insert_at_head(& ht->buckets[bucket], & node->link);
}
-void
+bool
hash_table_replace(struct hash_table *ht, void *data, const void *key)
{
const unsigned hash_value = (*ht->hash)(key);
@@ -162,7 +162,7 @@ hash_table_replace(struct hash_table *ht, void *data, const void *key)
if ((*ht->compare)(hn->key, key) == 0) {
hn->data = data;
- return;
+ return true;
}
}
@@ -172,6 +172,7 @@ hash_table_replace(struct hash_table *ht, void *data, const void *key)
hn->key = key;
insert_at_head(& ht->buckets[bucket], & hn->link);
+ return false;
}
void