diff options
author | Florian Westphal <fw@strlen.de> | 2019-02-08 17:02:19 +0100 |
---|---|---|
committer | Florian Westphal <fw@strlen.de> | 2019-02-08 21:22:21 +0100 |
commit | 68e76238749fb238bf92e7dc8903fed15a86aa1b (patch) | |
tree | 9d968dd70b1c214ac28cd48b794699291a81ffc9 /src/json.c | |
parent | a80997fa9a290462c5d001c5d448ddb2fbd7da5c (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 <fw@strlen.de>
Acked-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/json.c')
-rw-r--r-- | src/json.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -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"); |