From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36900) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WxIcx-0006Ok-KT for qemu-devel@nongnu.org; Wed, 18 Jun 2014 12:22:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WxIcp-0001K0-Ts for qemu-devel@nongnu.org; Wed, 18 Jun 2014 12:22:23 -0400 Received: from mx1.redhat.com ([209.132.183.28]:10900) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WxIcp-0001Jk-Lr for qemu-devel@nongnu.org; Wed, 18 Jun 2014 12:22:15 -0400 Date: Wed, 18 Jun 2014 19:22:35 +0300 From: "Michael S. Tsirkin" Message-ID: <1403108034-32054-106-git-send-email-mst@redhat.com> References: <1403108034-32054-1-git-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1403108034-32054-1-git-send-email-mst@redhat.com> Subject: [Qemu-devel] [PULL v2 105/106] tests: simplify code List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Peter Maydell , Hu Tao , Markus Armbruster , Luiz Capitulino , Anthony Liguori Use error_abort instead of open-coded assert. Cleaner and shorter. Reported-by: Eric Blake Signed-off-by: Michael S. Tsirkin Reviewed-by: Eric Blake --- 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