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 <cardoe@gentoo.org>
This commit is contained in:
Doug Goldstein 2010-08-05 14:12:52 -05:00 committed by Eric Blake
parent bcc8b58be3
commit 0890a70a19

View File

@ -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. "