mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
virDomainChrSourceDefCopy: return void
This function never returns an error, make it void then. And while at it, make the @src argument const to make it obvious it's never changed inside the function. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
7e57285eec
commit
9198b7090b
@ -2733,11 +2733,10 @@ virDomainChrSourceDefClear(virDomainChrSourceDef *def)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Almost deep copies the contents of src into dest. Some parts are not copied
|
/* Almost deep copies the contents of src into dest. Some parts are not copied
|
||||||
* though.
|
* though. */
|
||||||
* Returns -1 and report error on failure. */
|
void
|
||||||
int
|
|
||||||
virDomainChrSourceDefCopy(virDomainChrSourceDef *dest,
|
virDomainChrSourceDefCopy(virDomainChrSourceDef *dest,
|
||||||
virDomainChrSourceDef *src)
|
const virDomainChrSourceDef *src)
|
||||||
{
|
{
|
||||||
virDomainChrSourceDefClear(dest);
|
virDomainChrSourceDefClear(dest);
|
||||||
|
|
||||||
@ -2800,8 +2799,6 @@ virDomainChrSourceDefCopy(virDomainChrSourceDef *dest,
|
|||||||
case VIR_DOMAIN_CHR_TYPE_LAST:
|
case VIR_DOMAIN_CHR_TYPE_LAST:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -3348,8 +3348,8 @@ void virDomainSmartcardDefFree(virDomainSmartcardDef *def);
|
|||||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(virDomainSmartcardDef, virDomainSmartcardDefFree);
|
G_DEFINE_AUTOPTR_CLEANUP_FUNC(virDomainSmartcardDef, virDomainSmartcardDefFree);
|
||||||
void virDomainChrDefFree(virDomainChrDef *def);
|
void virDomainChrDefFree(virDomainChrDef *def);
|
||||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(virDomainChrDef, virDomainChrDefFree);
|
G_DEFINE_AUTOPTR_CLEANUP_FUNC(virDomainChrDef, virDomainChrDefFree);
|
||||||
int virDomainChrSourceDefCopy(virDomainChrSourceDef *dest,
|
void virDomainChrSourceDefCopy(virDomainChrSourceDef *dest,
|
||||||
virDomainChrSourceDef *src)
|
const virDomainChrSourceDef *src)
|
||||||
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
|
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
|
||||||
void virDomainSoundCodecDefFree(virDomainSoundCodecDef *def);
|
void virDomainSoundCodecDefFree(virDomainSoundCodecDef *def);
|
||||||
ssize_t virDomainSoundDefFind(const virDomainDef *def,
|
ssize_t virDomainSoundDefFind(const virDomainDef *def,
|
||||||
|
@ -2129,9 +2129,8 @@ qemuProcessFindCharDevicePTYsMonitor(virDomainObj *vm,
|
|||||||
chr->targetType == VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_SERIAL) {
|
chr->targetType == VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_SERIAL) {
|
||||||
/* yes, the first console is just an alias for serials[0] */
|
/* yes, the first console is just an alias for serials[0] */
|
||||||
i = 1;
|
i = 1;
|
||||||
if (virDomainChrSourceDefCopy(chr->source,
|
virDomainChrSourceDefCopy(chr->source,
|
||||||
((vm->def->serials[0])->source)) < 0)
|
((vm->def->serials[0])->source));
|
||||||
return -1;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user