mirror of https://gitee.com/openkylin/qemu.git
tests/qapi-schema: Drop superfluous error_is_set()
visit_type_TestStruct() does nothing when called with an error set. Callers shouldn't do that, and no caller does. Drop the superfluous test. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
This commit is contained in:
parent
4af8be1f88
commit
196857f8bf
|
@ -196,7 +196,7 @@ static void visit_type_TestStruct(Visitor *v, TestStruct **obj,
|
||||||
const char *name, Error **errp)
|
const char *name, Error **errp)
|
||||||
{
|
{
|
||||||
Error *err = NULL;
|
Error *err = NULL;
|
||||||
if (!error_is_set(errp)) {
|
|
||||||
visit_start_struct(v, (void **)obj, "TestStruct", name, sizeof(TestStruct),
|
visit_start_struct(v, (void **)obj, "TestStruct", name, sizeof(TestStruct),
|
||||||
&err);
|
&err);
|
||||||
if (!err) {
|
if (!err) {
|
||||||
|
@ -210,7 +210,6 @@ static void visit_type_TestStruct(Visitor *v, TestStruct **obj,
|
||||||
visit_end_struct(v, &err);
|
visit_end_struct(v, &err);
|
||||||
}
|
}
|
||||||
error_propagate(errp, err);
|
error_propagate(errp, err);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void test_visitor_in_struct(TestInputVisitorData *data,
|
static void test_visitor_in_struct(TestInputVisitorData *data,
|
||||||
|
|
Loading…
Reference in New Issue