]> xenbits.xensource.com Git - libvirt.git/commitdiff
tools: eliminate unnecessary labels
authorLaine Stump <laine@redhat.com>
Fri, 3 Jul 2020 03:20:27 +0000 (23:20 -0400)
committerLaine Stump <laine@redhat.com>
Wed, 8 Jul 2020 20:35:58 +0000 (16:35 -0400)
Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
tools/virsh-pool.c

index 885e000ed2f41840ba646ba37848ff0977a32374..622b1396d0311ae50c61dbfbb908b1f12d83e892 100644 (file)
@@ -330,9 +330,10 @@ virshBuildPoolXML(vshControl *ctl,
     VSH_EXCLUSIVE_OPTIONS("secret-usage", "secret-uuid");
 
     if (vshCommandOptStringReq(ctl, cmd, "name", &name) < 0)
-        goto cleanup;
+        return false;
+
     if (vshCommandOptStringReq(ctl, cmd, "type", &type) < 0)
-        goto cleanup;
+        return false;
 
     if (vshCommandOptStringReq(ctl, cmd, "source-host", &srcHost) < 0 ||
         vshCommandOptStringReq(ctl, cmd, "source-path", &srcPath) < 0 ||
@@ -351,8 +352,9 @@ virshBuildPoolXML(vshControl *ctl,
         vshCommandOptStringReq(ctl, cmd, "adapter-parent-wwnn", &adapterParentWwnn) < 0 ||
         vshCommandOptStringReq(ctl, cmd, "adapter-parent-wwpn", &adapterParentWwpn) < 0 ||
         vshCommandOptStringReq(ctl, cmd, "adapter-parent-fabric-wwn", &adapterParentFabricWwn) < 0 ||
-        vshCommandOptStringReq(ctl, cmd, "source-protocol-ver", &protoVer) < 0)
-        goto cleanup;
+        vshCommandOptStringReq(ctl, cmd, "source-protocol-ver", &protoVer) < 0) {
+        return false;
+    }
 
     virBufferAsprintf(&buf, "<pool type='%s'>\n", type);
     virBufferAdjustIndent(&buf, 2);
@@ -419,9 +421,6 @@ virshBuildPoolXML(vshControl *ctl,
     *xml = virBufferContentAndReset(&buf);
     *retname = name;
     return true;
-
- cleanup:
-    return false;
 }
 
 /*