]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu: Remove unnecessary virReportError on networkGetNetworkAddress return
authorLuyao Huang <lhuang@redhat.com>
Sat, 28 Feb 2015 09:08:34 +0000 (17:08 +0800)
committerJohn Ferlan <jferlan@redhat.com>
Tue, 10 Mar 2015 21:29:28 +0000 (17:29 -0400)
Error messages are already set in all code paths returning -1 from
networkGetNetworkAddress, so we don't want to overwrite them.

Signed-off-by: Luyao Huang <lhuang@redhat.com>
Signed-off-by: John Ferlan <jferlan@redhat.com>
src/qemu/qemu_command.c

index 3d1483e0234b6dd3b99b4e2560020d0b1cebee89..5fbc62dbe76f28d1d0b3a2ee47df9435dbdae0b7 100644 (file)
@@ -7388,12 +7388,9 @@ qemuBuildGraphicsVNCCommandLine(virQEMUDriverConfigPtr cfg,
                                        "network driver not present"));
                 goto error;
             }
-            if (ret < 0) {
-                virReportError(VIR_ERR_XML_ERROR,
-                               _("listen network '%s' had no usable address"),
-                               listenNetwork);
+            if (ret < 0)
                 goto error;
-            }
+
             listenAddr = netAddr;
             /* store the address we found in the <graphics> element so it will
              * show up in status. */
@@ -7552,12 +7549,9 @@ qemuBuildGraphicsSPICECommandLine(virQEMUDriverConfigPtr cfg,
                                    "network driver not present"));
             goto error;
         }
-        if (ret < 0) {
-            virReportError(VIR_ERR_XML_ERROR,
-                           _("listen network '%s' had no usable address"),
-                           listenNetwork);
+        if (ret < 0)
             goto error;
-        }
+
         listenAddr = netAddr;
         /* store the address we found in the <graphics> element so it will
          * show up in status. */