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:
Matt Coleman 2020-11-05 22:32:58 -05:00 committed by Michal Privoznik
parent 736c9ea02d
commit 53a1aa1759
5 changed files with 5 additions and 13 deletions

View File

@ -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,

View File

@ -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);

View File

@ -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;
}

View File

@ -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;

View File

@ -7290,8 +7290,7 @@ qemuDomainAttachDeviceConfig(virDomainDefPtr vmdef,
return -1;
}
if (virDomainControllerInsert(vmdef, controller) < 0)
return -1;
virDomainControllerInsert(vmdef, controller);
dev->data.controller = NULL;
break;