]> xenbits.xensource.com Git - libvirt.git/commitdiff
testVirFindSCSIHostByPCI: Remove unused 'path_addr'
authorPeter Krempa <pkrempa@redhat.com>
Thu, 11 Jun 2020 08:23:52 +0000 (10:23 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 15 Jun 2020 08:27:37 +0000 (10:27 +0200)
The path is formatted but then just freed without any use since
introduction of the test function.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com
tests/scsihosttest.c

index b58318d2956379d321fe4aca62f55dc3b807a576..4b2779eabf6c832f23333f2294166ef23b161868 100644 (file)
@@ -202,12 +202,9 @@ testVirFindSCSIHostByPCI(const void *data G_GNUC_UNUSED)
     unsigned int unique_id2 = 2;
     const char *pci_addr1 = "0000:00:1f.1";
     const char *pci_addr2 = "0000:00:1f.2";
-    char *path_addr = NULL;
     char *ret_host = NULL;
     int ret = -1;
 
-    path_addr = g_strdup_printf("%s/%s", abs_srcdir, "sysfs/class/scsi_host");
-
     if (!(ret_host = virSCSIHostFindByPCI(TEST_SCSIHOST_CLASS_PATH,
                                           pci_addr1, unique_id1)) ||
         STRNEQ(ret_host, "host0"))
@@ -236,7 +233,6 @@ testVirFindSCSIHostByPCI(const void *data G_GNUC_UNUSED)
 
  cleanup:
     VIR_FREE(ret_host);
-    VIR_FREE(path_addr);
     return ret;
 }