mirror of https://gitee.com/openkylin/libvirt.git
util: Prefer virGetLastErrorMessage over direct err->message usage
Signed-off-by: Ramy Elkest <ramyelkest@gmail.com> Reviewed-by: Erik Skultety <eskultet@redhat.com>
This commit is contained in:
parent
3f4db69c2f
commit
52d88d11db
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue