diff options
author | Tina Müller <cpan2@tinita.de> | 2019-02-28 19:40:53 +0100 |
---|---|---|
committer | Tina Müller <cpan2@tinita.de> | 2019-02-28 19:40:53 +0100 |
commit | 1560fc82ad6f642553edacae9d99f192ed480221 (patch) | |
tree | c3f5ff814336f8b1dbabd27119ec5201a12887dd | |
parent | 85d1f168ef39f4c4419ef362d849ea225c53fffc (diff) | |
download | libyaml-git-1560fc82ad6f642553edacae9d99f192ed480221.tar.gz |
Make declarations before other statements
-rw-r--r-- | tests/run-dumper.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/run-dumper.c b/tests/run-dumper.c index 302b9b9..04c5bee 100644 --- a/tests/run-dumper.c +++ b/tests/run-dumper.c @@ -79,10 +79,12 @@ error: int compare_nodes(yaml_document_t *document1, int index1, yaml_document_t *document2, int index2, int level) { - if (level++ > 1000) return 0; - yaml_node_t *node1 = yaml_document_get_node(document1, index1); - yaml_node_t *node2 = yaml_document_get_node(document2, index2); int k; + yaml_node_t *node1; + yaml_node_t *node2; + if (level++ > 1000) return 0; + node1 = yaml_document_get_node(document1, index1); + node2 = yaml_document_get_node(document2, index2); assert(node1); assert(node2); |