提交 eb918b90 编写于 作者: J Ján Tomko

testJSONFromString: regroup if blocks

Handle failure to parse the JSON in an else branch for readability.
Signed-off-by: NJán Tomko <jtomko@redhat.com>
上级 ee3e23a7
......@@ -36,11 +36,11 @@ testJSONFromString(const void *data)
ret = 0;
goto cleanup;
}
}
if (!info->pass) {
VIR_TEST_VERBOSE("Should not have parsed %s\n", info->doc);
goto cleanup;
} else {
if (!info->pass) {
VIR_TEST_VERBOSE("Should not have parsed %s\n", info->name);
goto cleanup;
}
}
VIR_TEST_DEBUG("Parsed %s\n", info->doc);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册