From: Luyao Huang Date: Sat, 28 Feb 2015 09:08:34 +0000 (+0800) Subject: qemu: Remove unnecessary virReportError on networkGetNetworkAddress return X-Git-Tag: v1.2.14-rc1~220 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=64595431cdf57f0a23351e8808f7c3c18e855f9f;p=thirdparty%2Flibvirt.git qemu: Remove unnecessary virReportError on networkGetNetworkAddress return 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 Signed-off-by: John Ferlan --- diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 3d1483e023..5fbc62dbe7 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -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 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 element so it will * show up in status. */