diff options
Diffstat (limited to 'tests/run-dumper.c')
-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); |