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/byteorder.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/expr/byteorder.c') diff --git a/src/expr/byteorder.c b/src/expr/byteorder.c index 1e6a51b..53283c1 100644 --- a/src/expr/byteorder.c +++ b/src/expr/byteorder.c @@ -356,3 +356,8 @@ struct expr_ops expr_ops_byteorder = { .snprintf = nft_rule_expr_byteorder_snprintf, .xml_parse = nft_rule_expr_byteorder_xml_parse, }; + +static void __init expr_byteorder_init(void) +{ + nft_expr_ops_register(&expr_ops_byteorder); +} -- cgit v1.2.3