Skip to content
Snippets Groups Projects
Commit 3163b345 authored by Marek Vavrusa's avatar Marek Vavrusa
Browse files

lib/generic: fixed typo in lru code

this caused a bug in pseudo-lru table that negated
stickiness of values to table slots
parent 531563a8
Branches
Tags
No related merge requests found
......@@ -166,7 +166,7 @@ static inline void *lru_slot_set(struct lru_hash_base *lru, const char *key, uin
uint32_t id = hash(key, len) % lru->size;
struct lru_slot *slot = lru_slot_at(lru, id);
if (lru_slot_match(slot, key, len)) {
slot->refs = 1; /* Increase slot significance */
slot->refs += 1; /* Increase slot significance */
} else {
if (slot->key) {
slot->refs -= 1; /* Decrease slot significance */
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment