From: Doug Goldstein Date: Thu, 5 Aug 2010 19:12:52 +0000 (-0500) Subject: Fix return value usage X-Git-Tag: v0.8.4~123 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0890a70a19606762e86cefb233f7ecf213eb7aa9;p=thirdparty%2Flibvirt.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/qemu/qemu_conf.c b/src/qemu/qemu_conf.c index da1ff34d32..376cd10fbc 100644 --- a/src/qemu/qemu_conf.c +++ b/src/qemu/qemu_conf.c @@ -1689,7 +1689,7 @@ qemudNetworkIfaceConnect(virConnectPtr conn, tapmac, vnet_hdr, &tapfd))) { - if (errno == ENOTSUP) { + if (err == ENOTSUP) { /* In this particular case, give a better diagnostic. */ qemuReportError(VIR_ERR_INTERNAL_ERROR, _("Failed to add tap interface to bridge. "