virDomainPCIAddressSet *addrs)
{
size_t i;
- virPCIDeviceAddress lpc_addr;
-
- memset(&lpc_addr, 0, sizeof(lpc_addr));
- lpc_addr.slot = 0x1;
+ virPCIDeviceAddress lpc_addr = { .slot = 0x1 };
/* If the user didn't explicitly specify slot 1 for some of the devices,
reserve it for LPC, even if there's no LPC device configured.
virDomainPCIConnectFlags flags,
int function)
{
- virPCIDeviceAddress addr;
+ virPCIDeviceAddress addr = { 0 };
if (virDomainPCIAddressGetNextAddr(addrs, &addr, flags,
dev->isolationGroup, function) < 0)
{
size_t i;
int tmpGroup;
- virPCIDeviceAddress addr;
+ virPCIDeviceAddress addr = { 0 };
/* this could be a refresh, so clear out the old data */
for (i = 0; i < pci_dev->nIommuGroupDevices; i++)
virNodeDeviceGetPCIVPDDynamicCap(virNodeDevCapPCIDev *devCapPCIDev)
{
g_autoptr(virPCIDevice) pciDev = NULL;
- virPCIDeviceAddress devAddr;
+ virPCIDeviceAddress devAddr = { 0 };
g_autoptr(virPCIVPDResource) res = NULL;
devAddr.domain = devCapPCIDev->domain;
virHostdevManager *hostdevMgr)
{
g_autoptr(virPCIDevice) pci = NULL;
- virPCIDeviceAddress devAddr;
+ virPCIDeviceAddress devAddr = { 0 };
g_autoptr(virNodeDeviceDef) def = NULL;
g_autofree char *xml = NULL;
g_autoptr(virConnect) nodeconn = NULL;
virHostdevManager *hostdevMgr)
{
g_autoptr(virPCIDevice) pci = NULL;
- virPCIDeviceAddress devAddr;
+ virPCIDeviceAddress devAddr = { 0 };
g_autoptr(virNodeDeviceDef) def = NULL;
g_autofree char *xml = NULL;
g_autoptr(virConnect) nodeconn = NULL;
const char *driverName)
{
g_autoptr(virPCIDevice) pci = NULL;
- virPCIDeviceAddress devAddr;
+ virPCIDeviceAddress devAddr = { 0 };
g_autoptr(virNodeDeviceDef) def = NULL;
g_autofree char *xml = NULL;
g_autoptr(virConnect) nodeconn = NULL;
virNodeDevCapPCIDev *pci_dev = &def->caps->data.pci_dev;
virPCIEDeviceInfo *pci_express = NULL;
virPCIDevice *pciDev = NULL;
- virPCIDeviceAddress devAddr;
+ virPCIDeviceAddress devAddr = { 0 };
int ret = -1;
char *p;
bool privileged = false;
virDomainPCIAddressSet *addrs)
{
size_t i;
- virPCIDeviceAddress tmp_addr;
+ virPCIDeviceAddress tmp_addr = { 0 };
g_autofree char *addrStr = NULL;
virDomainPCIConnectFlags flags = (VIR_PCI_CONNECT_AUTOASSIGN
| VIR_PCI_CONNECT_TYPE_PCI_DEVICE);
virDomainPCIAddressSet *addrs)
{
size_t i;
- virPCIDeviceAddress tmp_addr;
+ virPCIDeviceAddress tmp_addr = { 0 };
g_autofree char *addrStr = NULL;
virDomainPCIConnectFlags flags = VIR_PCI_CONNECT_TYPE_PCIE_DEVICE;
}
while ((direrr = virDirRead(groupDir, &ent, groupPath)) > 0) {
- virPCIDeviceAddress newDev;
+ virPCIDeviceAddress newDev = { 0 };
if (virPCIDeviceAddressParse(ent->d_name, &newDev) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,