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:
Ján Tomko 2019-04-02 16:06:52 +02:00
parent ee3e23a790
commit eb918b9033
1 changed files with 5 additions and 5 deletions

View File

@ -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);