From 2b6667abbf1af07ea8c9a33673a94a02c4d1ab59 Mon Sep 17 00:00:00 2001 From: ramyelkest Date: Sat, 5 May 2018 13:04:21 +0100 Subject: 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 Reviewed-by: Erik Skultety --- tests/commandtest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/commandtest.c') 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(); -- cgit v1.2.1