From: "Michael S. Tsirkin" <mst@redhat.com>
To: qemu-devel@nongnu.org
Cc: Hu Tao <hutao@cn.fujitsu.com>,
Markus Armbruster <armbru@redhat.com>,
Luiz Capitulino <lcapitulino@redhat.com>
Subject: [Qemu-devel] [PATCH] tests: simplify code
Date: Wed, 18 Jun 2014 18:37:08 +0300 [thread overview]
Message-ID: <1403105823-25481-1-git-send-email-mst@redhat.com> (raw)
Use error_abort instead of open-coded assert.
Cleaner and shorter.
Reported-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
tests/test-string-input-visitor.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/tests/test-string-input-visitor.c b/tests/test-string-input-visitor.c
index b01e2f2..8e3433e 100644
--- a/tests/test-string-input-visitor.c
+++ b/tests/test-string-input-visitor.c
@@ -69,14 +69,12 @@ static void test_visitor_in_intList(TestInputVisitorData *data,
{
int64_t value[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 20};
int16List *res = NULL, *tmp;
- Error *errp = NULL;
Visitor *v;
int i = 0;
v = visitor_input_test_init(data, "1,2,0,2-4,20,5-9,1-8");
- visit_type_int16List(v, &res, NULL, &errp);
- g_assert(errp == NULL);
+ visit_type_int16List(v, &res, NULL, &error_abort);
tmp = res;
while (i < sizeof(value) / sizeof(value[0])) {
g_assert(tmp);
--
MST
next reply other threads:[~2014-06-18 15:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-18 15:37 Michael S. Tsirkin [this message]
2014-06-18 15:42 ` [Qemu-devel] [PATCH] tests: simplify code Eric Blake
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1403105823-25481-1-git-send-email-mst@redhat.com \
--to=mst@redhat.com \
--cc=armbru@redhat.com \
--cc=hutao@cn.fujitsu.com \
--cc=lcapitulino@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).