summaryrefslogtreecommitdiffhomepage
path: root/src/hashtables.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/hashtables.c')
-rw-r--r--src/hashtables.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/hashtables.c b/src/hashtables.c
index b3f5ca3..978997a 100644
--- a/src/hashtables.c
+++ b/src/hashtables.c
@@ -144,8 +144,9 @@ struct index_hashtable_entry *index_hashtable_lookup(struct index_hashtable *tab
struct index_hashtable_entry *iter_entry, *entry = NULL;
rcu_read_lock_bh();
hlist_for_each_entry_rcu_bh (iter_entry, index_bucket(table, index), index_hash) {
- if (iter_entry->index == index && (iter_entry->type & type_mask)) {
- entry = iter_entry;
+ if (iter_entry->index == index) {
+ if (likely(iter_entry->type & type_mask))
+ entry = iter_entry;
break;
}
}