[libvirt PATCH 19/20] tests: use g_auto in testCompareXMLToConfFiles

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Use g_auto for dnsmasq context and remove the cmd variable.
It was unused since its introduction in:
commit 8b32c80df089a3612a0448c1a92abc2071d6b6a9

Signed-off-by: Ján Tomko <jtomko@xxxxxxxxxx>
---
 tests/networkxml2conftest.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/tests/networkxml2conftest.c b/tests/networkxml2conftest.c
index b76d72793a..7177505918 100644
--- a/tests/networkxml2conftest.c
+++ b/tests/networkxml2conftest.c
@@ -24,9 +24,8 @@ testCompareXMLToConfFiles(const char *inxml, const char *outconf,
     int ret = -1;
     virNetworkDef *def = NULL;
     virNetworkObj *obj = NULL;
-    virCommand *cmd = NULL;
     g_autofree char *pidfile = NULL;
-    dnsmasqContext *dctx = NULL;
+    g_autoptr(dnsmasqContext) dctx = NULL;
     g_autoptr(virNetworkXMLOption) xmlopt = NULL;
 
     if (!(xmlopt = networkDnsmasqCreateXMLConf()))
@@ -82,9 +81,7 @@ testCompareXMLToConfFiles(const char *inxml, const char *outconf,
 
  fail:
     VIR_FREE(confactual);
-    virCommandFree(cmd);
     virNetworkObjEndAPI(&obj);
-    dnsmasqContextFree(dctx);
     return ret;
 }
 
-- 
2.31.1




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux