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/osf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/osf.c') diff --git a/src/osf.c b/src/osf.c index b98d1650..9252934d 100644 --- a/src/osf.c +++ b/src/osf.c @@ -32,7 +32,7 @@ static bool osf_expr_cmp(const struct expr *e1, const struct expr *e2) return e1->osf.ttl == e2->osf.ttl; } -static const struct expr_ops osf_expr_ops = { +const struct expr_ops osf_expr_ops = { .type = EXPR_OSF, .name = "osf", .print = osf_expr_print, @@ -47,7 +47,7 @@ struct expr *osf_expr_alloc(const struct location *loc, const uint8_t ttl) const struct datatype *type = &string_type; struct expr *expr; - expr = expr_alloc(loc, &osf_expr_ops, type, + expr = expr_alloc(loc, EXPR_OSF, type, BYTEORDER_HOST_ENDIAN, len); expr->osf.ttl = ttl; -- cgit v1.2.3