mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-29 05:13:54 -06:00
tests: Clean up initialization of Error *err variables
Declaring a local Error *err without initializer looks suspicious. Fuse the declaration with the initialization to avoid that. Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20191204093625.14836-5-armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
This commit is contained in:
parent
e4eb089c62
commit
53cb2fc859
2 changed files with 6 additions and 6 deletions
|
@ -207,10 +207,10 @@ static void test_visitor_out_enum_errors(TestOutputVisitorData *data,
|
|||
const void *unused)
|
||||
{
|
||||
EnumOne i, bad_values[] = { ENUM_ONE__MAX, -1 };
|
||||
Error *err;
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(bad_values) ; i++) {
|
||||
err = NULL;
|
||||
Error *err = NULL;
|
||||
|
||||
visit_type_EnumOne(data->ov, "unused", &bad_values[i], &err);
|
||||
error_free_or_abort(&err);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue