* [Qemu-devel] [PATCH] tests: simplify code
@ 2014-06-18 15:37 Michael S. Tsirkin
2014-06-18 15:42 ` Eric Blake
0 siblings, 1 reply; 2+ messages in thread
From: Michael S. Tsirkin @ 2014-06-18 15:37 UTC (permalink / raw)
To: qemu-devel; +Cc: Hu Tao, Markus Armbruster, Luiz Capitulino
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] [PATCH] tests: simplify code
2014-06-18 15:37 [Qemu-devel] [PATCH] tests: simplify code Michael S. Tsirkin
@ 2014-06-18 15:42 ` Eric Blake
0 siblings, 0 replies; 2+ messages in thread
From: Eric Blake @ 2014-06-18 15:42 UTC (permalink / raw)
To: Michael S. Tsirkin, qemu-devel; +Cc: Hu Tao, Markus Armbruster, Luiz Capitulino
[-- Attachment #1: Type: text/plain, Size: 496 bytes --]
On 06/18/2014 09:37 AM, Michael S. Tsirkin wrote:
> 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(-)
>
Reviewed-by: Eric Blake <eblake@redhat.com>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-06-18 15:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-18 15:37 [Qemu-devel] [PATCH] tests: simplify code Michael S. Tsirkin
2014-06-18 15:42 ` Eric Blake
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.