Re: [PATCH 1/3] util: cleanup: using virGetLastErrorMessage instead of err->message

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

 



On Sat, May 05, 2018 at 01:04:19PM +0100, ramyelkest wrote:
> Signed-off-by: Ramy Elkest <ramyelkest@xxxxxxxxx>
> ---
>  src/util/virfilecache.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/src/util/virfilecache.c b/src/util/virfilecache.c
> index dab7216..96ae96d 100644
> --- a/src/util/virfilecache.c
> +++ b/src/util/virfilecache.c
> @@ -157,9 +157,8 @@ virFileCacheLoad(virFileCachePtr cache,
>      }
>
>      if (!(loadData = cache->handlers.loadFile(file, name, cache->priv))) {
> -        virErrorPtr err = virGetLastError();
>          VIR_WARN("Failed to load cached data from '%s' for '%s': %s",
> -                 file, name, err ? NULLSTR(err->message) : "unknown error");
> +                 file, name, virGetLastErrorMessage());
>          virResetLastError();
>          ret = 0;
>          goto cleanup;
> --

Reviewed-by: Erik Skultety <eskultet@xxxxxxxxxx>

I'll tweak the subject line a bit before pushing:
"util: Prefer virGetLastErrorMessage over direct err->message usage"

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

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

  Powered by Linux