summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorÁlvaro Neira Ayuso <alvaroneay@gmail.com>2013-08-27 20:10:37 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2013-08-28 00:21:20 +0200
commit16cb9c226bde108afac47f8537f38d502c82c51f (patch)
tree3c205c7e5494b0338eec785aa8bc7e9ab9f123ef /tests
parent6ad1dab62ca3efe38709efad27ca1cd776e4ca6f (diff)
tests: remove unnecessary variable initialization
Signed-off-by: Alvaro Neira Ayuso <alvaroneay@gmail.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/nft-parsing-test.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/tests/nft-parsing-test.c b/tests/nft-parsing-test.c
index bf5b519..648ed36 100644
--- a/tests/nft-parsing-test.c
+++ b/tests/nft-parsing-test.c
@@ -155,12 +155,12 @@ static int test_json(const char *filename)
{
#ifdef JSON_PARSING
int ret = -1;
- struct nft_table *t = NULL;
- struct nft_chain *c = NULL;
- struct nft_rule *r = NULL;
+ struct nft_table *t;
+ struct nft_chain *c;
+ struct nft_rule *r;
json_t *root;
json_error_t error;
- char *json = NULL;
+ char *json;
root = json_load_file(filename, 0, &error);
if (!root) {
@@ -222,13 +222,13 @@ static int test_xml(const char *filename)
{
#ifdef XML_PARSING
int ret = -1;
- struct nft_table *t = NULL;
- struct nft_chain *c = NULL;
- struct nft_rule *r = NULL;
- struct nft_set *s = NULL;
+ struct nft_table *t;
+ struct nft_chain *c;
+ struct nft_rule *r;
+ struct nft_set *s;
FILE *fp;
- mxml_node_t *tree = NULL;;
- char *xml = NULL;
+ mxml_node_t *tree;
+ char *xml;
fp = fopen(filename, "r");
tree = mxmlLoadFile(NULL, fp, MXML_NO_CALLBACK);