]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
Fix return value usage
authorDoug Goldstein <cardoe@gentoo.org>
Thu, 5 Aug 2010 19:12:52 +0000 (14:12 -0500)
committerEric Blake <eblake@redhat.com>
Thu, 5 Aug 2010 23:05:16 +0000 (17:05 -0600)
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>
src/qemu/qemu_conf.c

index da1ff34d325426a89b42728762a3eeaf6a9f5039..376cd10fbcbf90da948ce6395b8a6cf0dbdb1147 100644 (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. "