diff options
Diffstat (limited to 'src/parser_json.c')
-rw-r--r-- | src/parser_json.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/parser_json.c b/src/parser_json.c index a1765027..4468407b 100644 --- a/src/parser_json.c +++ b/src/parser_json.c @@ -2731,8 +2731,7 @@ static struct cmd *json_parse_cmd_add_rule(struct json_ctx *ctx, json_t *root, return NULL; } - rule->num_stmts++; - list_add_tail(&stmt->list, &rule->stmts); + rule_stmt_append(rule, stmt); } if (op == CMD_ADD) @@ -3404,8 +3403,7 @@ static struct cmd *json_parse_cmd_replace(struct json_ctx *ctx, return NULL; } - rule->num_stmts++; - list_add_tail(&stmt->list, &rule->stmts); + rule_stmt_append(rule, stmt); } if (op == CMD_REPLACE) |