summaryrefslogtreecommitdiffstats
path: root/src/osf.c
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2019-02-08 17:02:23 +0100
committerFlorian Westphal <fw@strlen.de>2019-02-08 21:26:16 +0100
commite3f195777ee54c7a57aab932b64c6ecbd782f68f (patch)
treef1336d55e55529df44d01c47f8fefd0b844bdfa8 /src/osf.c
parent72931553828af0ce85f0562b9ff8ec7f4d28e050 (diff)
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 <fw@strlen.de>
Diffstat (limited to 'src/osf.c')
-rw-r--r--src/osf.c4
1 files changed, 2 insertions, 2 deletions
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;