diff options
Diffstat (limited to 'src/expr/numgen.c')
-rw-r--r-- | src/expr/numgen.c | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/src/expr/numgen.c b/src/expr/numgen.c index f940081..70d0d0d 100644 --- a/src/expr/numgen.c +++ b/src/expr/numgen.c @@ -230,34 +230,10 @@ nftnl_expr_ng_snprintf(char *buf, size_t len, uint32_t type, return -1; } -static bool nftnl_expr_ng_cmp(const struct nftnl_expr *e1, - const struct nftnl_expr *e2) -{ - struct nftnl_expr_ng *n1 = nftnl_expr_data(e1); - struct nftnl_expr_ng *n2 = nftnl_expr_data(e2); - bool eq = true; - - if (e1->flags & (1 << NFTNL_EXPR_NG_DREG)) - eq &= (n1->dreg == n2->dreg); - if (e1->flags & (1 << NFTNL_EXPR_NG_MODULUS)) - eq &= (n1->modulus == n2->modulus); - if (e1->flags & (1 << NFTNL_EXPR_NG_TYPE)) - eq &= (n1->type == n2->type); - if (e1->flags & (1 << NFTNL_EXPR_NG_OFFSET)) - eq &= (n1->offset == n2->offset); - if (e1->flags & (1 << NFTNL_EXPR_NG_SET_NAME)) - eq &= !strcmp(n1->map.name, n2->map.name); - if (e1->flags & (1 << NFTNL_EXPR_NG_SET_ID)) - eq &= (n1->map.id == n2->map.id); - - return eq; -} - struct expr_ops expr_ops_ng = { .name = "numgen", .alloc_len = sizeof(struct nftnl_expr_ng), .max_attr = NFTA_NG_MAX, - .cmp = nftnl_expr_ng_cmp, .set = nftnl_expr_ng_set, .get = nftnl_expr_ng_get, .parse = nftnl_expr_ng_parse, |