mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
tests: Use error_free_or_abort() where appropriate
Done with this Coccinelle semantic patch: @@ expression E; @@ - g_assert(E); - error_free(E); + error_free_or_abort(&E); Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <1487362554-5688-1-git-send-email-armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
parent
d84f714eaf
commit
157db293eb
2 changed files with 3 additions and 6 deletions
|
@ -145,8 +145,7 @@ static void test_visitor_out_enum_errors(TestOutputVisitorData *data,
|
|||
for (i = 0; i < ARRAY_SIZE(bad_values) ; i++) {
|
||||
err = NULL;
|
||||
visit_type_EnumOne(data->ov, "unused", &bad_values[i], &err);
|
||||
g_assert(err);
|
||||
error_free(err);
|
||||
error_free_or_abort(&err);
|
||||
visitor_reset(data);
|
||||
}
|
||||
}
|
||||
|
@ -244,8 +243,7 @@ static void test_visitor_out_struct_errors(TestOutputVisitorData *data,
|
|||
u.has_enum1 = true;
|
||||
u.enum1 = bad_values[i];
|
||||
visit_type_UserDefOne(data->ov, "unused", &pu, &err);
|
||||
g_assert(err);
|
||||
error_free(err);
|
||||
error_free_or_abort(&err);
|
||||
visitor_reset(data);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue