From 1613094766602bdb8cae337ceecd8ab68f956197 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Tue, 24 Nov 2015 18:06:27 +0100 Subject: [PATCH] tests/ivshmem-test: Supply missing initializer in get_device() MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 f1793ba6fb..8f1a849ab4 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.11.4.GIT