Received: from eggs.gnu.org ([2001:4830:134:3::10]:33805) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a1H39-0002pG-5U for qemu-devel@nongnu.org; Tue, 24 Nov 2015 12:06:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a1H33-0005l7-Ez for qemu-devel@nongnu.org; Tue, 24 Nov 2015 12:06:39 -0500 Received: from mx1.redhat.com ([209.132.183.28]:57205) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a1H33-0005kV-8w for qemu-devel@nongnu.org; Tue, 24 Nov 2015 12:06:33 -0500 From: Markus Armbruster Date: Tue, 24 Nov 2015 18:06:27 +0100 Message-Id: <1448384789-14830-4-git-send-email-armbru@redhat.com> In-Reply-To: <1448384789-14830-1-git-send-email-armbru@redhat.com> References: <1448384789-14830-1-git-send-email-armbru@redhat.com> Subject: [Qemu-devel] [PATCH 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 Cc: marcandre.lureau@redhat.com, claudio.fontana@huawei.com If the device isn't found, the assertion uses dev without initialization. Fix that. Signed-off-by: Markus Armbruster --- 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); -- 2.4.3