After parsing input, rule location data (index or handle) is contained
in cmd->handle, not yet in cmd->rule->handle.
Fixes: 7df42800cf89e ("src: single cache_update() call to build cache before
evaluation")
Signed-off-by: Phil Sutter <[email protected]>
---
src/cache.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/src/cache.c b/src/cache.c
index 2a0f04d12e259..532ef425906ad 100644
--- a/src/cache.c
+++ b/src/cache.c
@@ -24,13 +24,7 @@ static unsigned int evaluate_cache_add(struct cmd *cmd)
completeness = cmd->op;
break;
case CMD_OBJ_RULE:
- /* XXX index is set to zero unless this handle_merge() call is
- * invoked, this handle_merge() call is done from the
- * evaluation, which is too late.
- */
- handle_merge(&cmd->rule->handle, &cmd->handle);
-
- if (cmd->rule->handle.index.id)
+ if (cmd->handle.index.id)
completeness = CMD_LIST;
break;
default:
--
2.21.0