[libvirt] [PATCH 3/3] Fix return value usage
Chris Lalancette
clalance at redhat.com
Thu Aug 5 19:24:14 UTC 2010
On 08/05/10 - 02:12:52PM, Doug Goldstein wrote:
> 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 at gentoo.org>
> ---
> src/qemu/qemu_conf.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c
> index e92021a..7c0e354 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. "
Makes sense to me.
ACK
--
Chris Lalancette
More information about the libvir-list
mailing list