mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-11 09:17:52 +03:00
domain_conf: make virDomainVirtioNetGuestOpts/HostOpts/DriverFormat() void
These functions always return zero, so they might as well be void. Signed-off-by: Matt Coleman <matt@datto.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
154b3f4256
commit
479a8c1fa1
@ -26692,7 +26692,7 @@ virDomainActualNetDefFormat(virBufferPtr buf,
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
static void
|
||||
virDomainVirtioNetGuestOptsFormat(char **outstr,
|
||||
virDomainNetDefPtr def)
|
||||
{
|
||||
@ -26720,11 +26720,10 @@ virDomainVirtioNetGuestOptsFormat(char **outstr,
|
||||
virBufferTrim(&buf, " ");
|
||||
|
||||
*outstr = virBufferContentAndReset(&buf);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
static void
|
||||
virDomainVirtioNetHostOptsFormat(char **outstr,
|
||||
virDomainNetDefPtr def)
|
||||
{
|
||||
@ -26760,11 +26759,10 @@ virDomainVirtioNetHostOptsFormat(char **outstr,
|
||||
virBufferTrim(&buf, " ");
|
||||
|
||||
*outstr = virBufferContentAndReset(&buf);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
static void
|
||||
virDomainVirtioNetDriverFormat(char **outstr,
|
||||
virDomainNetDefPtr def)
|
||||
{
|
||||
@ -26797,7 +26795,6 @@ virDomainVirtioNetDriverFormat(char **outstr,
|
||||
virDomainVirtioOptionsFormat(&buf, def->virtio);
|
||||
|
||||
*outstr = virBufferContentAndReset(&buf);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@ -27094,10 +27091,9 @@ virDomainNetDefFormat(virBufferPtr buf,
|
||||
g_autofree char *gueststr = NULL;
|
||||
g_autofree char *hoststr = NULL;
|
||||
|
||||
if (virDomainVirtioNetDriverFormat(&str, def) < 0 ||
|
||||
virDomainVirtioNetGuestOptsFormat(&gueststr, def) < 0 ||
|
||||
virDomainVirtioNetHostOptsFormat(&hoststr, def) < 0)
|
||||
rc = -1;
|
||||
virDomainVirtioNetDriverFormat(&str, def);
|
||||
virDomainVirtioNetGuestOptsFormat(&gueststr, def);
|
||||
virDomainVirtioNetHostOptsFormat(&hoststr, def);
|
||||
|
||||
if (!gueststr && !hoststr) {
|
||||
if (str)
|
||||
|
Loading…
Reference in New Issue
Block a user