Re: [libvirt PATCH 23/24] tests: vir: remove pointless labels

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 9/4/21 4:44 PM, Ján Tomko wrote:

@@ -319,9 +308,9 @@ testFileIsSharedFSType(const void *opaque G_GNUC_UNUSED)
      return EXIT_AM_SKIP;
  #else
      const struct testFileIsSharedFSType *data = opaque;
+    int ret = -1;
      g_autofree char *mtabFile = NULL;
      bool actual;
-    int ret = -1;

unrelated (well, only peripherally related) code movement.

[...]


@@ -199,15 +195,15 @@ testVirPCIDeviceReattach(const void *opaque G_GNUC_UNUSED)
for (i = 0; i < nDev; i++) {
          if (virPCIDeviceReattach(dev[i], activeDevs, inactiveDevs) < 0)
-            goto cleanup;
+            return -1;
CHECK_LIST_COUNT(activeDevs, 0);
          CHECK_LIST_COUNT(inactiveDevs, nDev - i - 1);
      }
- ret = 0;
+    return 0;
   cleanup:
-    return ret;
+    return -1;
  }


Oops. You forgot one! cleanup is no longer referenced, but you didn't remove it (or the dead code "return -1;" following it)




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux