From e3f195777ee54c7a57aab932b64c6ecbd782f68f Mon Sep 17 00:00:00 2001 From: Florian Westphal Date: Fri, 8 Feb 2019 17:02:23 +0100 Subject: src: expr: remove expr_ops from struct expr size of struct expr changes from 144 to 128 bytes on x86_64. This doesn't look like much, but large rulesets can have tens of thousands of expressions (each set element is represented by an expression). Signed-off-by: Florian Westphal --- src/fib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/fib.c') diff --git a/src/fib.c b/src/fib.c index 9a19cc34..f2bfef1d 100644 --- a/src/fib.c +++ b/src/fib.c @@ -101,7 +101,7 @@ static void fib_expr_clone(struct expr *new, const struct expr *expr) new->fib.flags= expr->fib.flags; } -static const struct expr_ops fib_expr_ops = { +const struct expr_ops fib_expr_ops = { .type = EXPR_FIB, .name = "fib", .print = fib_expr_print, @@ -135,7 +135,7 @@ struct expr *fib_expr_alloc(const struct location *loc, if (flags & NFTA_FIB_F_PRESENT) type = &boolean_type; - expr = expr_alloc(loc, &fib_expr_ops, type, + expr = expr_alloc(loc, EXPR_FIB, type, BYTEORDER_HOST_ENDIAN, len); expr->fib.result = result; -- cgit v1.2.3