]> andersk Git - libyaml.git/commitdiff
Make declarations before other statements
authorTina Müller <cpan2@tinita.de>
Thu, 28 Feb 2019 18:40:53 +0000 (19:40 +0100)
committerTina Müller <cpan2@tinita.de>
Thu, 28 Feb 2019 18:40:53 +0000 (19:40 +0100)
tests/run-dumper.c

index 302b9b96da3cc6b70028274bb092854c1896c1ee..04c5beeafa5798aeb22cc4163c2763ef6a5fdccf 100644 (file)
@@ -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);
This page took 0.034017 seconds and 5 git commands to generate.