提交 0eefd2a0 编写于 作者: P Peter Krempa

testVirFindSCSIHostByPCI: Remove unused 'path_addr'

The path is formatted but then just freed without any use since
introduction of the test function.
Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com
上级 84a4208e
...@@ -202,12 +202,9 @@ testVirFindSCSIHostByPCI(const void *data G_GNUC_UNUSED) ...@@ -202,12 +202,9 @@ testVirFindSCSIHostByPCI(const void *data G_GNUC_UNUSED)
unsigned int unique_id2 = 2; unsigned int unique_id2 = 2;
const char *pci_addr1 = "0000:00:1f.1"; const char *pci_addr1 = "0000:00:1f.1";
const char *pci_addr2 = "0000:00:1f.2"; const char *pci_addr2 = "0000:00:1f.2";
char *path_addr = NULL;
char *ret_host = NULL; char *ret_host = NULL;
int ret = -1; int ret = -1;
path_addr = g_strdup_printf("%s/%s", abs_srcdir, "sysfs/class/scsi_host");
if (!(ret_host = virSCSIHostFindByPCI(TEST_SCSIHOST_CLASS_PATH, if (!(ret_host = virSCSIHostFindByPCI(TEST_SCSIHOST_CLASS_PATH,
pci_addr1, unique_id1)) || pci_addr1, unique_id1)) ||
STRNEQ(ret_host, "host0")) STRNEQ(ret_host, "host0"))
...@@ -236,7 +233,6 @@ testVirFindSCSIHostByPCI(const void *data G_GNUC_UNUSED) ...@@ -236,7 +233,6 @@ testVirFindSCSIHostByPCI(const void *data G_GNUC_UNUSED)
cleanup: cleanup:
VIR_FREE(ret_host); VIR_FREE(ret_host);
VIR_FREE(path_addr);
return ret; return ret;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册