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/nat.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/expr/nat.c') diff --git a/src/expr/nat.c b/src/expr/nat.c index 66ae405..5ba2f4d 100644 --- a/src/expr/nat.c +++ b/src/expr/nat.c @@ -420,3 +420,8 @@ struct expr_ops expr_ops_nat = { .snprintf = nft_rule_expr_nat_snprintf, .xml_parse = nft_rule_expr_nat_xml_parse, }; + +static void __init expr_nat_init(void) +{ + nft_expr_ops_register(&expr_ops_nat); +} -- cgit v1.2.3