vlib: fix gcc build breakage
Type: fix
Fixes: 00ea98ad6
Change-Id: I4ac8c9c5902299d5f283ba4912d52d9bfcedef5c
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
diff --git a/src/vlib/pci/pci.c b/src/vlib/pci/pci.c
index b6a9416..dc4f382 100644
--- a/src/vlib/pci/pci.c
+++ b/src/vlib/pci/pci.c
@@ -176,6 +176,9 @@
return err;
offset = cfg.cap_ptr;
+ /* Make gcc happy, otherwise gcc fails build due to cap not set if offset ==
+ * 0 */
+ cap = (pci_capability_pcie_t *) (cfg.data + offset);
while (offset)
{
@@ -410,4 +413,3 @@
.short_help = "show pci [all]",
.function = show_pci_fn,
};
-