[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL v2 105/106] tests: simplify code
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] [PULL v2 105/106] tests: simplify code |
Date: |
Wed, 18 Jun 2014 19:22:35 +0300 |
Use error_abort instead of open-coded assert.
Cleaner and shorter.
Reported-by: Eric Blake <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
---
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
- [Qemu-devel] [PULL v2 041/106] migration: introduce self_announce_delay(), (continued)
- [Qemu-devel] [PULL v2 041/106] migration: introduce self_announce_delay(), Michael S. Tsirkin, 2014/06/18
- [Qemu-devel] [PULL v2 038/106] ich: get rid of spaces in type name, Michael S. Tsirkin, 2014/06/18
- [Qemu-devel] [PULL v2 028/106] pc: add acpi-device link to PCMachineState, Michael S. Tsirkin, 2014/06/18
- [Qemu-devel] [PULL v2 031/106] pc: add "hotplug-memory-region-size" property to PC_MACHINE, Michael S. Tsirkin, 2014/06/18
- [Qemu-devel] [PULL v2 049/106] vhost_net should call the poll callback only when it is set, Michael S. Tsirkin, 2014/06/18
- [Qemu-devel] [PULL v2 050/106] Refactor virtio-net to use generic get_vhost_net, Michael S. Tsirkin, 2014/06/18
- [Qemu-devel] [PULL v2 051/106] vhost_net_init will use VhostNetOptions to get all its arguments, Michael S. Tsirkin, 2014/06/18
- [Qemu-devel] [PULL v2 015/106] pc: exit QEMU if compat machine doesn't support memory hotlpug, Michael S. Tsirkin, 2014/06/18
- [Qemu-devel] [PULL v2 047/106] Add G_IO_HUP handler for socket chardev, Michael S. Tsirkin, 2014/06/18
- [Qemu-devel] [PULL v2 036/106] virtio: Drop superfluous conditionals around g_free(), Michael S. Tsirkin, 2014/06/18
- [Qemu-devel] [PULL v2 105/106] tests: simplify code,
Michael S. Tsirkin <=
- [Qemu-devel] [PULL v2 039/106] pc: q35: acpi: report error to user on unsupported unplug request, Michael S. Tsirkin, 2014/06/18