Commit 196857f8 authored by Markus Armbruster's avatar Markus Armbruster Committed by Luiz Capitulino
Browse files

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: default avatarMarkus Armbruster <armbru@redhat.com>
Reviewed-by: default avatarEric Blake <eblake@redhat.com>
Reviewed-by: default avatarMichael Roth <mdroth@linux.vnet.ibm.com>
Signed-off-by: default avatarLuiz Capitulino <lcapitulino@redhat.com>
parent 4af8be1f
Loading
Loading
Loading
Loading
+12 −13
Original line number Diff line number Diff line
@@ -196,7 +196,7 @@ static void visit_type_TestStruct(Visitor *v, TestStruct **obj,
                                  const char *name, Error **errp)
{
    Error *err = NULL;
    if (!error_is_set(errp)) {

    visit_start_struct(v, (void **)obj, "TestStruct", name, sizeof(TestStruct),
                       &err);
    if (!err) {
@@ -211,7 +211,6 @@ static void visit_type_TestStruct(Visitor *v, TestStruct **obj,
    }
    error_propagate(errp, err);
}
}

static void test_visitor_in_struct(TestInputVisitorData *data,
                                   const void *unused)