mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-07 15:47:01 +02:00
BUILD/DEBUG: lru: update the standalone code to support the revision
The standalone testing code didn't implement the revision and didn't build anymore, let's fix that.
This commit is contained in:
parent
08cb945a9b
commit
bf9c07fd91
@ -247,7 +247,7 @@ static unsigned long long sum(unsigned long long x)
|
|||||||
|
|
||||||
static long get_value(struct lru64_head *lru, long a)
|
static long get_value(struct lru64_head *lru, long a)
|
||||||
{
|
{
|
||||||
struct lru64 *item;
|
struct lru64 *item = NULL;
|
||||||
|
|
||||||
if (lru) {
|
if (lru) {
|
||||||
item = lru64_get(a, lru, lru, 0);
|
item = lru64_get(a, lru, lru, 0);
|
||||||
@ -258,7 +258,7 @@ static long get_value(struct lru64_head *lru, long a)
|
|||||||
/* do the painful work here */
|
/* do the painful work here */
|
||||||
a = sum(a);
|
a = sum(a);
|
||||||
if (item)
|
if (item)
|
||||||
lru64_commit(item, (void *)a, lru, 0);
|
lru64_commit(item, (void *)a, lru, 1, 0);
|
||||||
return a;
|
return a;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user