mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-11 15:27:47 +00:00
domain_conf: make virDomainControllerInsert() void
This function always returns zero, so it 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
736c9ea02d
commit
53a1aa1759
@ -18086,14 +18086,11 @@ virDomainNetARPInterfaces(virDomainDefPtr def,
|
||||
}
|
||||
|
||||
|
||||
int virDomainControllerInsert(virDomainDefPtr def,
|
||||
void virDomainControllerInsert(virDomainDefPtr def,
|
||||
virDomainControllerDefPtr controller)
|
||||
{
|
||||
def->controllers = g_renew(virDomainControllerDefPtr, def->controllers, def->ncontrollers + 1);
|
||||
|
||||
virDomainControllerInsertPreAlloced(def, controller);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void virDomainControllerInsertPreAlloced(virDomainDefPtr def,
|
||||
|
@ -3417,9 +3417,7 @@ int virDomainNetAppendIPAddress(virDomainNetDefPtr def,
|
||||
int family,
|
||||
unsigned int prefix);
|
||||
|
||||
int virDomainControllerInsert(virDomainDefPtr def,
|
||||
virDomainControllerDefPtr controller)
|
||||
G_GNUC_WARN_UNUSED_RESULT;
|
||||
void virDomainControllerInsert(virDomainDefPtr def, virDomainControllerDefPtr controller);
|
||||
void virDomainControllerInsertPreAlloced(virDomainDefPtr def,
|
||||
virDomainControllerDefPtr controller);
|
||||
int virDomainControllerFind(const virDomainDef *def, int type, int idx);
|
||||
|
@ -2127,8 +2127,7 @@ libxlMakeDefaultUSBControllers(virDomainDefPtr def,
|
||||
if (libxlMakeUSBController(l_controller, &x_controllers[i]) < 0)
|
||||
goto error;
|
||||
|
||||
if (virDomainControllerInsert(def, l_controller) < 0)
|
||||
goto error;
|
||||
virDomainControllerInsert(def, l_controller);
|
||||
|
||||
l_controller = NULL;
|
||||
}
|
||||
|
@ -3563,8 +3563,7 @@ libxlDomainAttachDeviceConfig(virDomainDefPtr vmdef, virDomainDeviceDefPtr dev)
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (virDomainControllerInsert(vmdef, controller) < 0)
|
||||
return -1;
|
||||
virDomainControllerInsert(vmdef, controller);
|
||||
dev->data.controller = NULL;
|
||||
break;
|
||||
|
||||
|
@ -7290,8 +7290,7 @@ qemuDomainAttachDeviceConfig(virDomainDefPtr vmdef,
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (virDomainControllerInsert(vmdef, controller) < 0)
|
||||
return -1;
|
||||
virDomainControllerInsert(vmdef, controller);
|
||||
dev->data.controller = NULL;
|
||||
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user