From mboxrd@z Thu Jan 1 00:00:00 1970 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 From: Markus Armbruster 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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PULL for-2.5 3/5] tests/ivshmem-test: Supply missing initializer in get_device() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@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=C3=A9 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; =20 pcibus =3D qpci_init_pc(); + dev =3D NULL; qpci_device_foreach(pcibus, 0x1af4, 0x1110, save_fn, &dev); g_assert(dev !=3D NULL); =20 --=20 2.4.3