Re: [libvirt] [PATCH] virConnectGetLibVersion: Avoid error message on success.

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

 



Eric Blake wrote:
> From: Paolo Smiraglia <paolo.smiraglia@xxxxxxxxx>
>
> * src/libvirt.c (virConnectGetLibVersion): Don't emit error on
> success.
> ---
>
> Paolo, thanks for the report; I've rewritten it in patch form, with a
> slight modification.  I think it is correct, but would like to hear
> feedback from someone more experienced with the design to say whether
> it was intentional before we push this.
>
>  src/libvirt.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/libvirt.c b/src/libvirt.c
> index cc5b4c5..c04489d 100644
> --- a/src/libvirt.c
> +++ b/src/libvirt.c
> @@ -1660,8 +1660,8 @@ virConnectGetLibVersion(virConnectPtr conn, unsigned long *libVer)
>          return ret;
>      }
>
> -   *libVer = LIBVIR_VERSION_NUMBER;
> -    ret = 0;
> +    *libVer = LIBVIR_VERSION_NUMBER;
> +    return 0;
>  error:
>      virDispatchError(conn);
>      return ret;

This change is fine.  It would be wrong to report an error there.
I'd insert a blank line after the "return 0;"

Thanks!

--
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]