Code Review
/
src
/
cynagora.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
review
|
tree
raw
|
patch
| inline |
side by side
(parent:
2e65887
)
cache: improve cache management
author
José Bollo
<jose.bollo@iot.bzh>
Wed, 14 Aug 2019 08:48:54 +0000
(10:48 +0200)
committer
José Bollo
<jose.bollo@iot.bzh>
Wed, 14 Aug 2019 08:48:54 +0000
(10:48 +0200)
Change-Id: I2a95154e728bf87976280b52ae0214664b107fd6
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
src/cache.c
patch
|
blob
|
history
diff --git
a/src/cache.c
b/src/cache.c
index
299d952
..
3b98c1e
100644
(file)
--- a/
src/cache.c
+++ b/
src/cache.c
@@
-107,8
+107,10
@@
drop_lre(
while (iter < cache->used) {
item = itemat(cache, iter);
hit = item->hit;
- if (hit <
hmin)
+ if (hit <
= hmin) {
found = iter;
+ hmin = hit;
+ }
iter += item->length;
}
if (found < cache->used)