From 4dd0772911a2c92a43d4e4aecf305fba498be106 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Sat, 13 Jul 2013 21:21:27 +0200 Subject: expr: use __attribute__((constructor)) to register expression Instead of manual array registration. Signed-off-by: Pablo Neira Ayuso --- src/expr/lookup.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/expr/lookup.c') diff --git a/src/expr/lookup.c b/src/expr/lookup.c index 9babfd1..9495ab0 100644 --- a/src/expr/lookup.c +++ b/src/expr/lookup.c @@ -261,3 +261,8 @@ struct expr_ops expr_ops_lookup = { .snprintf = nft_rule_expr_lookup_snprintf, .xml_parse = nft_rule_expr_lookup_xml_parse, }; + +static void __init expr_lookup_init(void) +{ + nft_expr_ops_register(&expr_ops_lookup); +} -- cgit v1.2.3