Re: [PATCH] qemu: Reset error if we're not going to error label

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2016-07-19 at 11:00 +0200, Martin Kletzander wrote:
> Signed-off-by: Martin Kletzander <mkletzan@xxxxxxxxxx>
> ---
>  src/qemu/qemu_conf.c | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c
> index fa9d65e91967..2a889381090f 100644
> --- a/src/qemu/qemu_conf.c
> +++ b/src/qemu/qemu_conf.c
> @@ -266,8 +266,11 @@ virQEMUDriverConfigPtr virQEMUDriverConfigNew(bool privileged)
>          virFileFindHugeTLBFS(&cfg->hugetlbfs, &cfg->nhugetlbfs) < 0) {
>          /* This however is not implemented on all platforms. */
>          virErrorPtr err = virGetLastError();
> -        if (err && err->code != VIR_ERR_NO_SUPPORT)
> -            goto error;
> +        if (err) {
> +            if (err->code == VIR_ERR_NO_SUPPORT)
> +                virResetError(err);
> +            else
> +                goto error;

You forgot the closing brace here.

>      }
> 
>      if (VIR_STRDUP(cfg->bridgeHelperName, QEMU_BRIDGE_HELPER) < 0)

Would virResetLastError() perhaps be more appropriate?

ACK either way.

-- 
Andrea Bolognani / Red Hat / Virtualization

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]