From: Doug Goldstein Date: Tue, 10 Aug 2010 21:43:29 +0000 (-0500) Subject: Fix return value usage X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=c0b0e8d07d3d437c4afa08f3f7320cfe5acda6bc;p=libvirt.git Fix return value usage Fix the error checking to use the return value from brAddTap() instead of checking the current errno value which might have been changed by clean up calls inside of brAddTap(). Signed-off-by: Doug Goldstein --- diff --git a/src/uml/uml_conf.c b/src/uml/uml_conf.c index bef8c385a2..025169fb45 100644 --- a/src/uml/uml_conf.c +++ b/src/uml/uml_conf.c @@ -141,7 +141,7 @@ umlConnectTapDevice(virDomainNetDefPtr net, tapmac, 0, &tapfd))) { - if (errno == ENOTSUP) { + if (err == ENOTSUP) { /* In this particular case, give a better diagnostic. */ umlReportError(VIR_ERR_INTERNAL_ERROR, _("Failed to add tap interface to bridge. "