path: root/src/json.c
diff options
authorFlorian Westphal <>2019-02-08 17:02:19 +0100
committerFlorian Westphal <>2019-02-08 21:22:21 +0100
commit68e76238749fb238bf92e7dc8903fed15a86aa1b (patch)
tree9d968dd70b1c214ac28cd48b794699291a81ffc9 /src/json.c
parenta80997fa9a290462c5d001c5d448ddb2fbd7da5c (diff)
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 <>
Diffstat (limited to 'src/json.c')
1 files changed, 1 insertions, 2 deletions
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");