mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
all: Replace virGetLastError with virGetLastErrorCode where we can
Replace instances where we previously called virGetLastError just to either get the code or to check if an error exists with virGetLastErrorCode to avoid a validity pre-check. Signed-off-by: Ramy Elkest <ramyelkest@gmail.com> Reviewed-by: Erik Skultety <eskultet@redhat.com>
This commit is contained in:
committed by
Erik Skultety
parent
50e96bb2a1
commit
2b6667abbf
@@ -49,7 +49,7 @@ linuxTestCompareFiles(const char *cpuinfofile,
|
||||
&nodeinfo.nodes, &nodeinfo.sockets,
|
||||
&nodeinfo.cores, &nodeinfo.threads) < 0) {
|
||||
if (virTestGetDebug()) {
|
||||
if (virGetLastError())
|
||||
if (virGetLastErrorCode())
|
||||
VIR_TEST_DEBUG("\n%s\n", virGetLastErrorMessage());
|
||||
}
|
||||
VIR_FORCE_FCLOSE(cpuinfo);
|
||||
|
||||
Reference in New Issue
Block a user