virDomainDeviceInfo *info,
void *opaque)
{
+ virDomainPCIAddressSet *addrs = NULL;
+ virPCIDeviceAddress *addr = NULL;
if (info->type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_DRIVE)
return 0;
- virDomainPCIAddressSet *addrs = opaque;
- virPCIDeviceAddress *addr = &info->addr.pci;
+ addrs = opaque;
+ addr = &info->addr.pci;
if (addr->domain == 0 && addr->bus == 0 && addr->slot == 0) {
return 0;
DIR *
opendir(const char *path)
{
- init_syms();
-
g_autofree char *path_override = NULL;
+ init_syms();
+
if (STREQ(path, "fakefirmwaredir")) {
path_override = g_strdup(FAKEFIRMWAREDIR);
} else if (STREQ(path, "fakefirmwareemptydir")) {
#define DO_TEST_BHYVE(Name, Emulator, BhyveCaps, Type) \
do { \
g_autofree char *name = NULL; \
+ struct testData data; \
name = g_strdup_printf("bhyve_%s.x86_64", Name); \
- struct testData data = { \
+ data = (struct testData) { \
.name = name, \
.emulator = Emulator, \
.arch = "x86_64", \
/* Any changes to this function ^^ should be reflected here too. */
#ifndef __linux__
- char * tmp;
+ {
+ char * tmp;
- if (!(tmp = virStringReplace(confactual,
- "except-interface=lo0\n",
- "except-interface=lo\n")))
- goto fail;
- VIR_FREE(confactual);
- confactual = g_steal_pointer(&tmp);
+ if (!(tmp = virStringReplace(confactual,
+ "except-interface=lo0\n",
+ "except-interface=lo\n")))
+ goto fail;
+ VIR_FREE(confactual);
+ confactual = g_steal_pointer(&tmp);
+ }
#endif
if (virTestCompareToFile(confactual, outconf) < 0)