From: Cole Robinson Date: Thu, 19 May 2016 19:25:10 +0000 (-0400) Subject: tests: nodeinfotest: Remove virSaveLastError() usage X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=ee814d0ec4805bb0663cc0f87a450cb7a59fe6d9;p=libvirt.git tests: nodeinfotest: Remove virSaveLastError() usage It's overkill here, we can use virGetLast* instead --- diff --git a/tests/nodeinfotest.c b/tests/nodeinfotest.c index d8eace5bf0..03500fba97 100644 --- a/tests/nodeinfotest.c +++ b/tests/nodeinfotest.c @@ -44,10 +44,8 @@ linuxTestCompareFiles(char *sysfs_prefix, memset(&nodeinfo, 0, sizeof(nodeinfo)); if (linuxNodeInfoCPUPopulate(sysfs_prefix, cpuinfo, arch, &nodeinfo) < 0) { if (virTestGetDebug()) { - virErrorPtr error = virSaveLastError(); - if (error && error->code != VIR_ERR_OK) - VIR_TEST_DEBUG("\n%s\n", error->message); - virFreeError(error); + if (virGetLastError()) + VIR_TEST_DEBUG("\n%s\n", virGetLastErrorMessage()); } VIR_FORCE_FCLOSE(cpuinfo); goto fail;