diff options
author | Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com> | 2013-08-21 21:21:29 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2013-08-22 02:18:37 +0200 |
commit | c15e8e5d2a1bbcb56d571b5f97ef30d1b8839d70 (patch) | |
tree | 20c5b3de8b65050cb7788a8b7d0b74413982ac79 /src/rule.c | |
parent | 404940fb8ce9de396a988aae8d07f8014ce11fee (diff) |
src: constify nft_*_parse input data
Since the input string is not changing, let's make it constant.
Signed-off-by: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/rule.c')
-rw-r--r-- | src/rule.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -475,7 +475,7 @@ int nft_rule_nlmsg_parse(const struct nlmsghdr *nlh, struct nft_rule *r) } EXPORT_SYMBOL(nft_rule_nlmsg_parse); -static int nft_rule_json_parse(struct nft_rule *r, char *json) +static int nft_rule_json_parse(struct nft_rule *r, const char *json) { #ifdef JSON_PARSING json_t *root, *node, *array; @@ -562,7 +562,7 @@ err: #endif } -static int nft_rule_xml_parse(struct nft_rule *r, char *xml) +static int nft_rule_xml_parse(struct nft_rule *r, const char *xml) { #ifdef XML_PARSING mxml_node_t *tree, *node, *save; @@ -668,7 +668,8 @@ err: #endif } -int nft_rule_parse(struct nft_rule *r, enum nft_rule_parse_type type, char *data) +int nft_rule_parse(struct nft_rule *r, enum nft_rule_parse_type type, + const char *data) { int ret; |