summaryrefslogtreecommitdiffstats
path: root/include/expr_ops.h
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2021-03-09 10:40:16 +0100
committerPhil Sutter <phil@nwl.cc>2021-03-15 12:23:11 +0100
commitf4ad4d3879cead150e86c279ac8e4770e4b167b1 (patch)
treeeac8c2276ecdcc598fff2707975909d01b56f900 /include/expr_ops.h
parent636fd0daf4890a785e8b165c5ce2c602e5361fcb (diff)
expr: Check output type once and for all
There is but a single supported output type left, so check it in expr.c and drop all the single option switch statements in individual expressions. Since the parameter is now unused (and to ensure code correctness), drop 'type' parameter from struct expr_ops' snprintf callback. Signed-off-by: Phil Sutter <phil@nwl.cc>
Diffstat (limited to 'include/expr_ops.h')
-rw-r--r--include/expr_ops.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/expr_ops.h b/include/expr_ops.h
index 5237ac7..7a6aa23 100644
--- a/include/expr_ops.h
+++ b/include/expr_ops.h
@@ -18,7 +18,7 @@ struct expr_ops {
const void *(*get)(const struct nftnl_expr *e, uint16_t type, uint32_t *data_len);
int (*parse)(struct nftnl_expr *e, struct nlattr *attr);
void (*build)(struct nlmsghdr *nlh, const struct nftnl_expr *e);
- int (*snprintf)(char *buf, size_t len, uint32_t type, uint32_t flags, const struct nftnl_expr *e);
+ int (*snprintf)(char *buf, size_t len, uint32_t flags, const struct nftnl_expr *e);
};
struct expr_ops *nftnl_expr_ops_lookup(const char *name);