]> xenbits.xensource.com Git - libvirt.git/commitdiff
Fix return value usage
authorDoug Goldstein <cardoe@gentoo.org>
Tue, 10 Aug 2010 21:43:29 +0000 (16:43 -0500)
committerEric Blake <eblake@redhat.com>
Tue, 10 Aug 2010 22:38:37 +0000 (16:38 -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/uml/uml_conf.c

index bef8c385a2c29772921d4c4d02e82c3c81bd77fc..025169fb454742d07076e15c2629022f0a3ea4d9 100644 (file)
@@ -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. "