summaryrefslogtreecommitdiff
path: root/tests/commandtest.c
diff options
context:
space:
mode:
authorramyelkest <ramyelkest@gmail.com>2018-05-05 13:04:21 +0100
committerErik Skultety <eskultet@redhat.com>2018-06-05 18:44:05 +0200
commit2b6667abbf1af07ea8c9a33673a94a02c4d1ab59 (patch)
treee6898f89991192a0b80638ae6e52e38c662bd71d /tests/commandtest.c
parent50e96bb2a18a1bd7c2e7c5585e4ba60759496121 (diff)
downloadlibvirt-2b6667abbf1af07ea8c9a33673a94a02c4d1ab59.tar.gz
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>
Diffstat (limited to 'tests/commandtest.c')
-rw-r--r--tests/commandtest.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/commandtest.c b/tests/commandtest.c
index ad81c2a712..744a387aa0 100644
--- a/tests/commandtest.c
+++ b/tests/commandtest.c
@@ -127,7 +127,7 @@ static int test0(const void *unused ATTRIBUTE_UNUSED)
if (virCommandRun(cmd, NULL) == 0)
goto cleanup;
- if (virGetLastError() == NULL)
+ if (virGetLastErrorCode() == VIR_ERR_OK)
goto cleanup;
virResetLastError();