From patchwork Wed Nov 25 10:40:27 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Markus Armbruster X-Patchwork-Id: 548482 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3C4331402A5 for ; Wed, 25 Nov 2015 21:41:19 +1100 (AEDT) Received: from localhost ([::1]:44336 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a1XVk-0006WN-Ne for incoming@patchwork.ozlabs.org; Wed, 25 Nov 2015 05:41:16 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49139) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a1XV6-0005UR-CV for qemu-devel@nongnu.org; Wed, 25 Nov 2015 05:40:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a1XV3-0005Wu-1e for qemu-devel@nongnu.org; Wed, 25 Nov 2015 05:40:36 -0500 Received: from mx1.redhat.com ([209.132.183.28]:44972) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a1XV2-0005WX-S0 for qemu-devel@nongnu.org; Wed, 25 Nov 2015 05:40:32 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (Postfix) with ESMTPS id E8667461DA for ; Wed, 25 Nov 2015 10:40:31 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-116-45.ams2.redhat.com [10.36.116.45]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id tAPAeUm1031136 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Wed, 25 Nov 2015 05:40:31 -0500 Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 96F403001875; Wed, 25 Nov 2015 11:40:29 +0100 (CET) From: Markus Armbruster To: qemu-devel@nongnu.org Date: Wed, 25 Nov 2015 11:40:27 +0100 Message-Id: <1448448029-32466-4-git-send-email-armbru@redhat.com> In-Reply-To: <1448448029-32466-1-git-send-email-armbru@redhat.com> References: <1448448029-32466-1-git-send-email-armbru@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL for-2.5 3/5] tests/ivshmem-test: Supply missing initializer in get_device() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org If the device isn't found, the assertion uses dev without initialization. Fix that. Signed-off-by: Markus Armbruster Message-Id: <1448384789-14830-4-git-send-email-armbru@redhat.com> Reviewed-by: Marc-André Lureau --- tests/ivshmem-test.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/ivshmem-test.c b/tests/ivshmem-test.c index f1793ba..8f1a849 100644 --- a/tests/ivshmem-test.c +++ b/tests/ivshmem-test.c @@ -40,6 +40,7 @@ static QPCIDevice *get_device(void) QPCIBus *pcibus; pcibus = qpci_init_pc(); + dev = NULL; qpci_device_foreach(pcibus, 0x1af4, 0x1110, save_fn, &dev); g_assert(dev != NULL);