evaluate: add set to cache once
Pablo Neira Ayuso
maintainerPATCH 1/1 evaluate: add set to cache once
67d3969a7244 ("evaluate: add set to the cache") re-adds the set into the cache again.
This bug was hidden behind 5ec5c706d993 ("cache: add hashtable cache for table") which broken set_evaluate() for anonymous sets.
Phil reported a gcc compilation warning which uncovered this problem.
Reported-by Phil Sutter <[email protected]>
Fixes 67d3969a7244 ("evaluate: add set to the cache")
Signed-off-by Pablo Neira Ayuso <[email protected]>
--- src/evaluate.c | 3 --- 1 file changed, 3 deletions(-)
src/evaluate.c +0 -3
@@ -3867,9 +3867,6 @@ static int set_evaluate(struct eval_ctx *ctx, struct set *set) } ctx->set =NULL ; -if (set_cache_find (table, set->handle.set.name) ==NULL ) -set_cache_add (set_get (set), table); -return 0 ; }
Signature · 1 line
2.20.1
Phil Sutter
reviewerQuoted 11 lines · Pablo Neira Ayuso
67d3969a7244("evaluate: add set to the cache") re-adds the set into the cache again.This bug was hidden behind
5ec5c706d993("cache: add hashtable cache for table") which brokenset_evaluate()for anonymous sets.Phil reported a gcc compilation warning which uncovered this problem.
Reported-by Phil Sutter <[email protected]>Fixes 67d3969a7244 ("evaluate: add set to the cache")Signed-off-by Pablo Neira Ayuso <[email protected]>
Thanks for the quick fix!
Out of curiosity, did you not use set_is_anonymous() in commit bbcc5eda7e588 on purpose?
Cheers, Phil