diff options
author | Eric Blake <eblake@redhat.com> | 2015-11-05 23:35:30 -0700 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2015-11-09 16:45:05 +0100 |
commit | 3f66f764ee25f10d3e1144ebc057a949421b7728 (patch) | |
tree | de1bba1a49030a5e8f8553a94ec3f4c341a1be24 /tests/image-fuzzer | |
parent | b18f1141d0afa00de11a8e079f4f5305c9e36893 (diff) |
qapi: Simplify non-error testing in test-qmp-*
By using &error_abort, we can avoid a local err variable in
situations where we expect success. It also has the nice
effect that if the test breaks, the error message from
error_abort tends to be nicer than that of g_assert().
This patch has an additional bonus of fixing several call sites that
were passing &err to two different functions without checking it in
between. In general that is unsafe practice; because if the first
function sets an error, the second function could abort() if it tries to
set a different error. We got away with it because we were asserting
that err was NULL through the entire chain, but switching to
&error_abort avoids the questionable practice up front.
Signed-off-by: Eric Blake <eblake@redhat.com>
Message-Id: <1446791754-23823-7-git-send-email-eblake@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'tests/image-fuzzer')
0 files changed, 0 insertions, 0 deletions