From 68e76238749fb238bf92e7dc8903fed15a86aa1b Mon Sep 17 00:00:00 2001 From: Florian Westphal Date: Fri, 8 Feb 2019 17:02:19 +0100 Subject: src: expr: add and use expr_name helper Currently callers use expr->ops->name, but follouwp patch will remove the ops pointer from struct expr. So add this helper and use it everywhere. Signed-off-by: Florian Westphal Acked-by: Pablo Neira Ayuso --- src/json.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/json.c') diff --git a/src/json.c b/src/json.c index fc92d464..2a70e42f 100644 --- a/src/json.c +++ b/src/json.c @@ -39,8 +39,7 @@ static json_t *expr_print_json(const struct expr *expr, struct output_ctx *octx) if (expr->ops->json) return expr->ops->json(expr, octx); - printf("warning: expr ops %s have no json callback\n", - expr->ops->name); + printf("warning: expr ops %s have no json callback\n", expr_name(expr)); fp = octx->output_fp; octx->output_fp = fmemopen(buf, 1024, "w"); -- cgit v1.2.3