diff options
Diffstat (limited to 'src/expr/cmp.c')
-rw-r--r-- | src/expr/cmp.c | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/src/expr/cmp.c b/src/expr/cmp.c index 86d7842..6b1c0fa 100644 --- a/src/expr/cmp.c +++ b/src/expr/cmp.c @@ -176,8 +176,9 @@ static inline int nftnl_str2cmp(const char *op) } } -static int nftnl_expr_cmp_snprintf_default(char *buf, size_t size, - const struct nftnl_expr *e) +static int +nftnl_expr_cmp_snprintf(char *buf, size_t size, + uint32_t flags, const struct nftnl_expr *e) { struct nftnl_expr_cmp *cmp = nftnl_expr_data(e); int remain = size, offset = 0, ret; @@ -193,21 +194,6 @@ static int nftnl_expr_cmp_snprintf_default(char *buf, size_t size, return offset; } -static int -nftnl_expr_cmp_snprintf(char *buf, size_t size, uint32_t type, - uint32_t flags, const struct nftnl_expr *e) -{ - switch (type) { - case NFTNL_OUTPUT_DEFAULT: - return nftnl_expr_cmp_snprintf_default(buf, size, e); - case NFTNL_OUTPUT_XML: - case NFTNL_OUTPUT_JSON: - default: - break; - } - return -1; -} - struct expr_ops expr_ops_cmp = { .name = "cmp", .alloc_len = sizeof(struct nftnl_expr_cmp), |