[PATCH 3/4] lib: Drop needless ret variables

Daniel P. Berrangé berrange at redhat.com
Tue May 5 12:09:05 UTC 2020


On Tue, May 05, 2020 at 12:10:07PM +0200, Michal Privoznik wrote:
> diff --git a/tools/virt-host-validate-bhyve.c b/tools/virt-host-validate-bhyve.c
> index 2f0ec1e36c..3e8cc59a38 100644
> --- a/tools/virt-host-validate-bhyve.c
> +++ b/tools/virt-host-validate-bhyve.c
> @@ -47,7 +47,6 @@
>  
>  int virHostValidateBhyve(void)
>  {
> -    int ret = 0;
>      int fileid = 0;
>      struct kld_file_stat stat;
>      bool vmm_loaded = false, if_tap_loaded = false;
> @@ -73,5 +72,5 @@ int virHostValidateBhyve(void)
>      MODULE_STATUS_WARN(if_bridge, "bridged networking will not work");
>      MODULE_STATUS_WARN(nmdm, "nmdm console will not work");
>  
> -    return ret;
> +    return 0;
>  }

This change broke the build because MODULE_STATUS_WARN is a macro that
does indeed use  'ret'.


Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|




More information about the libvir-list mailing list