diff --git a/utils/mqnic-bmc.c b/utils/mqnic-bmc.c index 80d2234c0..2ee4978ce 100644 --- a/utils/mqnic-bmc.c +++ b/utils/mqnic-bmc.c @@ -228,7 +228,7 @@ int main(int argc, char *argv[]) return -1; } - if (dev->pci_device_path) + if (dev->pci_device_path[0]) { char *ptr = strrchr(dev->pci_device_path, '/'); if (ptr) diff --git a/utils/mqnic-config.c b/utils/mqnic-config.c index d8ae93d81..178b37cae 100644 --- a/utils/mqnic-config.c +++ b/utils/mqnic-config.c @@ -145,7 +145,7 @@ int main(int argc, char *argv[]) return -1; } - if (dev->pci_device_path) + if (dev->pci_device_path[0]) { char *ptr = strrchr(dev->pci_device_path, '/'); if (ptr) diff --git a/utils/mqnic-dump.c b/utils/mqnic-dump.c index 64c235153..91500fd5d 100644 --- a/utils/mqnic-dump.c +++ b/utils/mqnic-dump.c @@ -100,7 +100,7 @@ int main(int argc, char *argv[]) return -1; } - if (dev->pci_device_path) + if (dev->pci_device_path[0]) { char *ptr = strrchr(dev->pci_device_path, '/'); if (ptr)