mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-11 23:37:42 +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)
|
virDomainControllerDefPtr controller)
|
||||||
{
|
{
|
||||||
def->controllers = g_renew(virDomainControllerDefPtr, def->controllers, def->ncontrollers + 1);
|
def->controllers = g_renew(virDomainControllerDefPtr, def->controllers, def->ncontrollers + 1);
|
||||||
|
|
||||||
virDomainControllerInsertPreAlloced(def, controller);
|
virDomainControllerInsertPreAlloced(def, controller);
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void virDomainControllerInsertPreAlloced(virDomainDefPtr def,
|
void virDomainControllerInsertPreAlloced(virDomainDefPtr def,
|
||||||
|
@ -3417,9 +3417,7 @@ int virDomainNetAppendIPAddress(virDomainNetDefPtr def,
|
|||||||
int family,
|
int family,
|
||||||
unsigned int prefix);
|
unsigned int prefix);
|
||||||
|
|
||||||
int virDomainControllerInsert(virDomainDefPtr def,
|
void virDomainControllerInsert(virDomainDefPtr def, virDomainControllerDefPtr controller);
|
||||||
virDomainControllerDefPtr controller)
|
|
||||||
G_GNUC_WARN_UNUSED_RESULT;
|
|
||||||
void virDomainControllerInsertPreAlloced(virDomainDefPtr def,
|
void virDomainControllerInsertPreAlloced(virDomainDefPtr def,
|
||||||
virDomainControllerDefPtr controller);
|
virDomainControllerDefPtr controller);
|
||||||
int virDomainControllerFind(const virDomainDef *def, int type, int idx);
|
int virDomainControllerFind(const virDomainDef *def, int type, int idx);
|
||||||
|
@ -2127,8 +2127,7 @@ libxlMakeDefaultUSBControllers(virDomainDefPtr def,
|
|||||||
if (libxlMakeUSBController(l_controller, &x_controllers[i]) < 0)
|
if (libxlMakeUSBController(l_controller, &x_controllers[i]) < 0)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
if (virDomainControllerInsert(def, l_controller) < 0)
|
virDomainControllerInsert(def, l_controller);
|
||||||
goto error;
|
|
||||||
|
|
||||||
l_controller = NULL;
|
l_controller = NULL;
|
||||||
}
|
}
|
||||||
|
@ -3563,8 +3563,7 @@ libxlDomainAttachDeviceConfig(virDomainDefPtr vmdef, virDomainDeviceDefPtr dev)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (virDomainControllerInsert(vmdef, controller) < 0)
|
virDomainControllerInsert(vmdef, controller);
|
||||||
return -1;
|
|
||||||
dev->data.controller = NULL;
|
dev->data.controller = NULL;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -7290,8 +7290,7 @@ qemuDomainAttachDeviceConfig(virDomainDefPtr vmdef,
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (virDomainControllerInsert(vmdef, controller) < 0)
|
virDomainControllerInsert(vmdef, controller);
|
||||||
return -1;
|
|
||||||
dev->data.controller = NULL;
|
dev->data.controller = NULL;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user