qemuDomainAttachChrDevice: Drop 'dev' variable

It's referenced only once and it's a shortcut to the chardev source thus
can be used directly.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Peter Krempa 2021-11-18 15:35:08 +01:00
parent a9d16dea49
commit 15e769bd9b

View File

@ -2184,7 +2184,6 @@ int qemuDomainAttachChrDevice(virQEMUDriver *driver,
virDomainDef *vmdef = vm->def;
g_autoptr(virJSONValue) devprops = NULL;
g_autoptr(virJSONValue) netdevprops = NULL;
virDomainChrSourceDef *dev = chr->source;
g_autofree char *charAlias = NULL;
bool chardevAttached = false;
bool teardowncgroup = false;
@ -2233,7 +2232,7 @@ int qemuDomainAttachChrDevice(virQEMUDriver *driver,
if (qemuDomainChrPreInsert(vmdef, chr) < 0)
goto cleanup;
if (qemuDomainAddChardevTLSObjects(driver, vm, dev,
if (qemuDomainAddChardevTLSObjects(driver, vm, chr->source,
chr->info.alias, charAlias,
&tlsAlias, &secAlias) < 0)
goto audit;