mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 16:53:55 -06:00
tests: Use error_free_or_abort() where appropriate
Replace g_assert(err != NULL); error_free(err); err = NULL; and variations thereof by error_free_or_abort(&err); Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <20200630090351.1247703-6-armbru@redhat.com>
This commit is contained in:
parent
d8da9e71b6
commit
7b8eb7f848
7 changed files with 14 additions and 39 deletions
|
@ -54,10 +54,9 @@ static void test_base64_bad(const char *input,
|
|||
&len,
|
||||
&err);
|
||||
|
||||
g_assert(err != NULL);
|
||||
error_free_or_abort(&err);
|
||||
g_assert(actual == NULL);
|
||||
g_assert_cmpint(len, ==, 0);
|
||||
error_free(err);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue