mirror of https://gitee.com/openkylin/libvirt.git
testJSONFromString: regroup if blocks
Handle failure to parse the JSON in an else branch for readability. Signed-off-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
ee3e23a790
commit
eb918b9033
|
@ -36,11 +36,11 @@ testJSONFromString(const void *data)
|
||||||
ret = 0;
|
ret = 0;
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
|
if (!info->pass) {
|
||||||
if (!info->pass) {
|
VIR_TEST_VERBOSE("Should not have parsed %s\n", info->name);
|
||||||
VIR_TEST_VERBOSE("Should not have parsed %s\n", info->doc);
|
goto cleanup;
|
||||||
goto cleanup;
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
VIR_TEST_DEBUG("Parsed %s\n", info->doc);
|
VIR_TEST_DEBUG("Parsed %s\n", info->doc);
|
||||||
|
|
Loading…
Reference in New Issue