Patchwork [libnftables,1/4] tests: remove unnecessary variable initialization

login
register
mail settings
Submitter Alvaro Neira
Date Aug. 27, 2013, 6:10 p.m.
Message ID <20130827181037.9399.30579.stgit@Ph0enix>
Download mbox | patch
Permalink /patch/270176/
State Accepted
Headers show

Comments

Alvaro Neira - Aug. 27, 2013, 6:10 p.m.
From: Álvaro Neira Ayuso <alvaroneay@gmail.com>

Signed-off-by: Alvaro Neira Ayuso <alvaroneay@gmail.com>
---
 tests/nft-parsing-test.c |   20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)


--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Pablo Neira - Aug. 27, 2013, 10:51 p.m.
Applied, thanks.
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

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);