]> 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)
committerCole Robinson <crobinso@redhat.com>
Tue, 28 Apr 2015 15:06:39 +0000 (11:06 -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>
(cherry picked from commit 64595431cdf57f0a23351e8808f7c3c18e855f9f)

src/qemu/qemu_command.c

index abfa9436870ca0ac157400b0fe004869ed0170bb..45ae7cf8c912f36092888d9b8b7979b09a70d733 100644 (file)
@@ -7294,12 +7294,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. */
@@ -7458,12 +7455,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. */