mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-02 01:45:17 +00:00
tests: use g_auto in testCompareXMLToConfFiles
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@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
e86d62f8f7
commit
8843cd113e
@ -24,9 +24,8 @@ testCompareXMLToConfFiles(const char *inxml, const char *outconf,
|
|||||||
int ret = -1;
|
int ret = -1;
|
||||||
virNetworkDef *def = NULL;
|
virNetworkDef *def = NULL;
|
||||||
virNetworkObj *obj = NULL;
|
virNetworkObj *obj = NULL;
|
||||||
virCommand *cmd = NULL;
|
|
||||||
g_autofree char *pidfile = NULL;
|
g_autofree char *pidfile = NULL;
|
||||||
dnsmasqContext *dctx = NULL;
|
g_autoptr(dnsmasqContext) dctx = NULL;
|
||||||
g_autoptr(virNetworkXMLOption) xmlopt = NULL;
|
g_autoptr(virNetworkXMLOption) xmlopt = NULL;
|
||||||
|
|
||||||
if (!(xmlopt = networkDnsmasqCreateXMLConf()))
|
if (!(xmlopt = networkDnsmasqCreateXMLConf()))
|
||||||
@ -82,9 +81,7 @@ testCompareXMLToConfFiles(const char *inxml, const char *outconf,
|
|||||||
|
|
||||||
fail:
|
fail:
|
||||||
VIR_FREE(confactual);
|
VIR_FREE(confactual);
|
||||||
virCommandFree(cmd);
|
|
||||||
virNetworkObjEndAPI(&obj);
|
virNetworkObjEndAPI(&obj);
|
||||||
dnsmasqContextFree(dctx);
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user