From 1a7429bc152ed3a5368c4024f6b8e489c02ae322 Mon Sep 17 00:00:00 2001 From: Harsha Sharma Date: Fri, 6 Oct 2017 20:17:54 +0530 Subject: nftables: make pointers in string arrays constant Static const char * array should be static const char * const array as per linux-kernel coding style. Signed-off-by: Harsha Sharma Signed-off-by: Pablo Neira Ayuso --- src/rule.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/rule.c') diff --git a/src/rule.c b/src/rule.c index 67a828f7..d744cf61 100644 --- a/src/rule.c +++ b/src/rule.c @@ -496,7 +496,7 @@ struct symbol *symbol_lookup(const struct scope *scope, const char *identifier) return NULL; } -static const char *chain_type_str_array[] = { +static const char * const chain_type_str_array[] = { "filter", "nat", "route", @@ -515,7 +515,7 @@ const char *chain_type_name_lookup(const char *name) return NULL; } -static const char *chain_hookname_str_array[] = { +static const char * const chain_hookname_str_array[] = { "prerouting", "input", "forward", @@ -1345,7 +1345,7 @@ static void obj_print_data(const struct obj *obj, } } -static const char *obj_type_name_array[] = { +static const char * const obj_type_name_array[] = { [NFT_OBJECT_COUNTER] = "counter", [NFT_OBJECT_QUOTA] = "quota", [NFT_OBJECT_CT_HELPER] = "", -- cgit v1.2.3