Glib provides g_auto(GStrv) which is in-place replacement of our
VIR_AUTOSTRINGLIST.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/conf/cpu_conf.c | 2 +-
src/conf/domain_conf.c | 2 +-
src/cpu/cpu_arm.c | 2 +-
src/libxl/xen_common.c | 10 +++----
src/libxl/xen_xl.c | 2 +-
src/lxc/lxc_process.c | 2 +-
src/qemu/qemu_capabilities.c | 6 ++---
src/qemu/qemu_cgroup.c | 2 +-
src/qemu/qemu_conf.c | 10 +++----
src/qemu/qemu_firmware.c | 4 +--
src/qemu/qemu_monitor_json.c | 4 +--
src/qemu/qemu_namespace.c | 28 ++++++++++----------
src/qemu/qemu_process.c | 4 +--
src/qemu/qemu_qapi.c | 2 +-
src/qemu/qemu_vhost_user.c | 2 +-
src/rpc/virnetsocket.c | 4 +--
src/storage/storage_backend_sheepdog.c | 4 +--
src/storage/storage_backend_zfs.c | 12 ++++-----
src/util/vircgroup.c | 2 +-
src/util/vircommand.c | 2 +-
src/util/virdevmapper.c | 6 ++---
src/util/virfile.c | 2 +-
src/util/virfirewall.c | 2 +-
src/util/virhook.c | 2 +-
src/util/virjson.c | 2 +-
src/util/virprocess.c | 2 +-
src/util/virstoragefile.c | 10 +++----
src/util/virsystemd.c | 2 +-
src/vmx/vmx.c | 2 +-
tests/qemufirmwaretest.c | 2 +-
tests/qemusecuritytest.c | 2 +-
tests/qemuvhostusertest.c | 2 +-
tests/qemuxml2argvtest.c | 4 +--
tests/virfirewalltest.c | 2 +-
tools/virsh-completer-domain.c | 36 +++++++++++++-------------
tools/virsh-completer-host.c | 6 ++---
tools/virsh-completer-interface.c | 2 +-
tools/virsh-completer-network.c | 8 +++---
tools/virsh-completer-nodedev.c | 6 ++---
tools/virsh-completer-nwfilter.c | 4 +--
tools/virsh-completer-pool.c | 6 ++---
tools/virsh-completer-secret.c | 4 +--
tools/virsh-completer-snapshot.c | 2 +-
tools/virsh-completer-volume.c | 2 +-
tools/virsh-completer.c | 4 +--
tools/virsh-domain.c | 4 +--
46 files changed, 116 insertions(+), 116 deletions(-)
diff --git a/src/conf/cpu_conf.c b/src/conf/cpu_conf.c
index 5ff87cb41c..a2d88ba818 100644
--- a/src/conf/cpu_conf.c
+++ b/src/conf/cpu_conf.c
@@ -985,7 +985,7 @@ virCPUDefCheckFeatures(virCPUDefPtr cpu,
void *opaque,
char ***features)
{
- VIR_AUTOSTRINGLIST list = NULL;
+ g_auto(GStrv) list = NULL;
size_t n = 0;
size_t i;
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index b1534dcc1e..cef3b2b9f1 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -32595,7 +32595,7 @@ static int
virDomainDiskAddISCSIPoolSourceHost(virStorageSourcePtr src,
virStoragePoolDefPtr pooldef)
{
- VIR_AUTOSTRINGLIST tokens = NULL;
+ g_auto(GStrv) tokens = NULL;
size_t ntokens;
/* Only support one host */
diff --git a/src/cpu/cpu_arm.c b/src/cpu/cpu_arm.c
index 8a408a324a..6ba5bf0724 100644
--- a/src/cpu/cpu_arm.c
+++ b/src/cpu/cpu_arm.c
@@ -550,7 +550,7 @@ virCPUarmCpuDataFromRegs(virCPUarmData *data)
{
unsigned long cpuid;
unsigned long hwcaps;
- VIR_AUTOSTRINGLIST features = NULL;
+ g_auto(GStrv) features = NULL;
int cpu_feature_index = 0;
size_t i;
diff --git a/src/libxl/xen_common.c b/src/libxl/xen_common.c
index c82e487d80..407d28aaa5 100644
--- a/src/libxl/xen_common.c
+++ b/src/libxl/xen_common.c
@@ -370,8 +370,8 @@ static virDomainHostdevDefPtr
xenParsePCI(char *entry)
{
virDomainHostdevDefPtr hostdev = NULL;
- VIR_AUTOSTRINGLIST tokens = NULL;
- VIR_AUTOSTRINGLIST options = NULL;
+ g_auto(GStrv) tokens = NULL;
+ g_auto(GStrv) options = NULL;
size_t ntokens = 0;
size_t nexttoken = 0;
char *str;
@@ -482,7 +482,7 @@ xenHandleConfGetValueStringListErrors(int ret)
static int
xenParsePCIList(virConfPtr conf, virDomainDefPtr def)
{
- VIR_AUTOSTRINGLIST pcis = NULL;
+ g_auto(GStrv) pcis = NULL;
char **entries = NULL;
int rc;
@@ -709,7 +709,7 @@ xenParseVfb(virConfPtr conf, virDomainDefPtr def)
}
if (!hvm && def->graphics == NULL) { /* New PV guests use this format */
- VIR_AUTOSTRINGLIST vfbs = NULL;
+ g_auto(GStrv) vfbs = NULL;
int rc;
if ((rc = virConfGetValueStringList(conf, "vfb", false, &vfbs)) ==
1) {
@@ -941,7 +941,7 @@ xenParseSxprChar(const char *value,
static int
xenParseCharDev(virConfPtr conf, virDomainDefPtr def, const char *nativeFormat)
{
- VIR_AUTOSTRINGLIST serials = NULL;
+ g_auto(GStrv) serials = NULL;
virDomainChrDefPtr chr = NULL;
if (def->os.type == VIR_DOMAIN_OSTYPE_HVM) {
diff --git a/src/libxl/xen_xl.c b/src/libxl/xen_xl.c
index ed0ce77db4..ba0942601f 100644
--- a/src/libxl/xen_xl.c
+++ b/src/libxl/xen_xl.c
@@ -1151,7 +1151,7 @@ static int
xenParseXLNamespaceData(virConfPtr conf, virDomainDefPtr def)
{
virConfValuePtr list = virConfGetValue(conf, "device_model_args");
- VIR_AUTOSTRINGLIST args = NULL;
+ g_auto(GStrv) args = NULL;
size_t nargs;
libxlDomainXmlNsDefPtr nsdata = NULL;
diff --git a/src/lxc/lxc_process.c b/src/lxc/lxc_process.c
index c5a710fc3f..7e07f49f9a 100644
--- a/src/lxc/lxc_process.c
+++ b/src/lxc/lxc_process.c
@@ -1184,7 +1184,7 @@ int virLXCProcessStart(virConnectPtr conn,
size_t i;
g_autofree char *logfile = NULL;
int logfd = -1;
- VIR_AUTOSTRINGLIST veths = NULL;
+ g_auto(GStrv) veths = NULL;
int handshakefds[2] = { -1, -1 };
off_t pos = -1;
char ebuf[1024];
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index 538551e772..5802d0e2c5 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -2616,7 +2616,7 @@ virQEMUCapsProbeQMPObjectProperties(virQEMUCapsPtr qemuCaps,
for (i = 0; i < G_N_ELEMENTS(virQEMUCapsObjectProps); i++) {
virQEMUCapsObjectTypeProps *props = virQEMUCapsObjectProps + i;
- VIR_AUTOSTRINGLIST values = NULL;
+ g_auto(GStrv) values = NULL;
int nvalues;
if (props->capsCondition >= 0 &&
@@ -2883,7 +2883,7 @@ virQEMUCapsFetchCPUDefinitions(qemuMonitorPtr mon,
/* QEMU 2.11 for Power renamed all CPU models to lower case, we need to
* translate them back to libvirt's upper case model names. */
if (ARCH_IS_PPC64(arch)) {
- VIR_AUTOSTRINGLIST libvirtModels = NULL;
+ g_auto(GStrv) libvirtModels = NULL;
char **name;
if (virCPUGetModels(arch, &libvirtModels) < 0)
@@ -5908,7 +5908,7 @@ virQEMUCapsFillDomainCPUCaps(virQEMUCapsPtr qemuCaps,
VIR_CPU_MODE_CUSTOM,
domCaps->machine)) {
const char *forbidden[] = { "host", NULL };
- VIR_AUTOSTRINGLIST models = NULL;
+ g_auto(GStrv) models = NULL;
if (virCPUGetModels(domCaps->arch, &models) >= 0) {
domCaps->cpu.custom = virQEMUCapsGetCPUModels(qemuCaps,
diff --git a/src/qemu/qemu_cgroup.c b/src/qemu/qemu_cgroup.c
index 10fdc7444d..f7146a71c9 100644
--- a/src/qemu/qemu_cgroup.c
+++ b/src/qemu/qemu_cgroup.c
@@ -60,7 +60,7 @@ qemuSetupImagePathCgroup(virDomainObjPtr vm,
{
qemuDomainObjPrivatePtr priv = vm->privateData;
int perms = VIR_CGROUP_DEVICE_READ;
- VIR_AUTOSTRINGLIST targetPaths = NULL;
+ g_auto(GStrv) targetPaths = NULL;
size_t i;
int rv;
diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c
index cbdde0c0dc..0ee51f1cec 100644
--- a/src/qemu/qemu_conf.c
+++ b/src/qemu/qemu_conf.c
@@ -632,7 +632,7 @@ static int
virQEMUDriverConfigLoadProcessEntry(virQEMUDriverConfigPtr cfg,
virConfPtr conf)
{
- VIR_AUTOSTRINGLIST hugetlbfs = NULL;
+ g_auto(GStrv) hugetlbfs = NULL;
g_autofree char *stdioHandler = NULL;
g_autofree char *corestr = NULL;
size_t i;
@@ -825,13 +825,13 @@ virQEMUDriverConfigLoadNVRAMEntry(virQEMUDriverConfigPtr cfg,
virConfPtr conf,
bool privileged)
{
- VIR_AUTOSTRINGLIST nvram = NULL;
+ g_auto(GStrv) nvram = NULL;
size_t i;
if (virConfGetValueStringList(conf, "nvram", false, &nvram) < 0)
return -1;
if (nvram) {
- VIR_AUTOSTRINGLIST fwList = NULL;
+ g_auto(GStrv) fwList = NULL;
virFirmwareFreeList(cfg->firmwares, cfg->nfirmwares);
cfg->firmwares = NULL;
@@ -880,8 +880,8 @@ virQEMUDriverConfigLoadSecurityEntry(virQEMUDriverConfigPtr cfg,
virConfPtr conf,
bool privileged)
{
- VIR_AUTOSTRINGLIST controllers = NULL;
- VIR_AUTOSTRINGLIST namespaces = NULL;
+ g_auto(GStrv) controllers = NULL;
+ g_auto(GStrv) namespaces = NULL;
g_autofree char *user = NULL;
g_autofree char *group = NULL;
size_t i, j;
diff --git a/src/qemu/qemu_firmware.c b/src/qemu/qemu_firmware.c
index eebe6fcf78..639cff7459 100644
--- a/src/qemu/qemu_firmware.c
+++ b/src/qemu/qemu_firmware.c
@@ -1183,7 +1183,7 @@ qemuFirmwareFetchParsedConfigs(bool privileged,
qemuFirmwarePtr **firmwaresRet,
char ***pathsRet)
{
- VIR_AUTOSTRINGLIST paths = NULL;
+ g_auto(GStrv) paths = NULL;
size_t npaths;
qemuFirmwarePtr *firmwares = NULL;
size_t i;
@@ -1218,7 +1218,7 @@ qemuFirmwareFillDomain(virQEMUDriverPtr driver,
virDomainDefPtr def,
unsigned int flags)
{
- VIR_AUTOSTRINGLIST paths = NULL;
+ g_auto(GStrv) paths = NULL;
qemuFirmwarePtr *firmwares = NULL;
ssize_t nfirmwares = 0;
const qemuFirmware *theone = NULL;
diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c
index 49751570a5..1326e76192 100644
--- a/src/qemu/qemu_monitor_json.c
+++ b/src/qemu/qemu_monitor_json.c
@@ -8049,7 +8049,7 @@ qemuMonitorJSONGetCPUData(qemuMonitorPtr mon,
virCPUDataPtr data)
{
qemuMonitorJSONObjectProperty prop = { .type = QEMU_MONITOR_OBJECT_PROPERTY_BOOLEAN
};
- VIR_AUTOSTRINGLIST props = NULL;
+ g_auto(GStrv) props = NULL;
char **p;
if (qemuMonitorJSONGetCPUProperties(mon, &props) < 0)
@@ -8081,7 +8081,7 @@ qemuMonitorJSONGetCPUDataDisabled(qemuMonitorPtr mon,
void *opaque,
virCPUDataPtr data)
{
- VIR_AUTOSTRINGLIST props = NULL;
+ g_auto(GStrv) props = NULL;
char **p;
if (qemuMonitorJSONGetStringListProperty(mon, QOM_CPU_PATH,
diff --git a/src/qemu/qemu_namespace.c b/src/qemu/qemu_namespace.c
index 1030309b5a..1002455ddf 100644
--- a/src/qemu/qemu_namespace.c
+++ b/src/qemu/qemu_namespace.c
@@ -247,7 +247,7 @@ qemuDomainSetupDisk(virStorageSourcePtr src,
if (!(tmpPath =
virPCIDeviceAddressGetIOMMUGroupDev(&next->nvme->pciAddr)))
return -1;
} else {
- VIR_AUTOSTRINGLIST targetPaths = NULL;
+ g_auto(GStrv) targetPaths = NULL;
if (virStorageSourceIsEmpty(next) ||
!virStorageSourceIsLocalStorage(next)) {
@@ -613,7 +613,7 @@ int
qemuDomainBuildNamespace(virQEMUDriverConfigPtr cfg,
virDomainObjPtr vm)
{
- VIR_AUTOSTRINGLIST paths = NULL;
+ g_auto(GStrv) paths = NULL;
if (!qemuDomainNamespaceEnabled(vm, QEMU_DOMAIN_NS_MOUNT)) {
VIR_DEBUG("namespaces disabled for domain %s", vm->def->name);
@@ -1335,7 +1335,7 @@ qemuNamespaceUnlinkPaths(virDomainObjPtr vm,
qemuDomainObjPrivatePtr priv = vm->privateData;
virQEMUDriverPtr driver = priv->driver;
g_autoptr(virQEMUDriverConfig) cfg = NULL;
- VIR_AUTOSTRINGLIST unlinkPaths = NULL;
+ g_auto(GStrv) unlinkPaths = NULL;
char **devMountsPath = NULL;
size_t ndevMountsPath = 0;
size_t npaths;
@@ -1387,7 +1387,7 @@ int
qemuDomainNamespaceSetupDisk(virDomainObjPtr vm,
virStorageSourcePtr src)
{
- VIR_AUTOSTRINGLIST paths = NULL;
+ g_auto(GStrv) paths = NULL;
if (!qemuDomainNamespaceEnabled(vm, QEMU_DOMAIN_NS_MOUNT))
return 0;
@@ -1431,7 +1431,7 @@ int
qemuDomainNamespaceSetupHostdev(virDomainObjPtr vm,
virDomainHostdevDefPtr hostdev)
{
- VIR_AUTOSTRINGLIST paths = NULL;
+ g_auto(GStrv) paths = NULL;
if (!qemuDomainNamespaceEnabled(vm, QEMU_DOMAIN_NS_MOUNT))
return 0;
@@ -1464,7 +1464,7 @@ int
qemuDomainNamespaceTeardownHostdev(virDomainObjPtr vm,
virDomainHostdevDefPtr hostdev)
{
- VIR_AUTOSTRINGLIST paths = NULL;
+ g_auto(GStrv) paths = NULL;
if (!qemuDomainNamespaceEnabled(vm, QEMU_DOMAIN_NS_MOUNT))
return 0;
@@ -1486,7 +1486,7 @@ int
qemuDomainNamespaceSetupMemory(virDomainObjPtr vm,
virDomainMemoryDefPtr mem)
{
- VIR_AUTOSTRINGLIST paths = NULL;
+ g_auto(GStrv) paths = NULL;
if (!qemuDomainNamespaceEnabled(vm, QEMU_DOMAIN_NS_MOUNT))
return 0;
@@ -1505,7 +1505,7 @@ int
qemuDomainNamespaceTeardownMemory(virDomainObjPtr vm,
virDomainMemoryDefPtr mem)
{
- VIR_AUTOSTRINGLIST paths = NULL;
+ g_auto(GStrv) paths = NULL;
if (!qemuDomainNamespaceEnabled(vm, QEMU_DOMAIN_NS_MOUNT))
return 0;
@@ -1524,7 +1524,7 @@ int
qemuDomainNamespaceSetupChardev(virDomainObjPtr vm,
virDomainChrDefPtr chr)
{
- VIR_AUTOSTRINGLIST paths = NULL;
+ g_auto(GStrv) paths = NULL;
if (!qemuDomainNamespaceEnabled(vm, QEMU_DOMAIN_NS_MOUNT))
return 0;
@@ -1543,7 +1543,7 @@ int
qemuDomainNamespaceTeardownChardev(virDomainObjPtr vm,
virDomainChrDefPtr chr)
{
- VIR_AUTOSTRINGLIST paths = NULL;
+ g_auto(GStrv) paths = NULL;
if (!qemuDomainNamespaceEnabled(vm, QEMU_DOMAIN_NS_MOUNT))
return 0;
@@ -1562,7 +1562,7 @@ int
qemuDomainNamespaceSetupRNG(virDomainObjPtr vm,
virDomainRNGDefPtr rng)
{
- VIR_AUTOSTRINGLIST paths = NULL;
+ g_auto(GStrv) paths = NULL;
if (!qemuDomainNamespaceEnabled(vm, QEMU_DOMAIN_NS_MOUNT))
return 0;
@@ -1581,7 +1581,7 @@ int
qemuDomainNamespaceTeardownRNG(virDomainObjPtr vm,
virDomainRNGDefPtr rng)
{
- VIR_AUTOSTRINGLIST paths = NULL;
+ g_auto(GStrv) paths = NULL;
if (!qemuDomainNamespaceEnabled(vm, QEMU_DOMAIN_NS_MOUNT))
return 0;
@@ -1600,7 +1600,7 @@ int
qemuDomainNamespaceSetupInput(virDomainObjPtr vm,
virDomainInputDefPtr input)
{
- VIR_AUTOSTRINGLIST paths = NULL;
+ g_auto(GStrv) paths = NULL;
if (!qemuDomainNamespaceEnabled(vm, QEMU_DOMAIN_NS_MOUNT))
return 0;
@@ -1618,7 +1618,7 @@ int
qemuDomainNamespaceTeardownInput(virDomainObjPtr vm,
virDomainInputDefPtr input)
{
- VIR_AUTOSTRINGLIST paths = NULL;
+ g_auto(GStrv) paths = NULL;
if (!qemuDomainNamespaceEnabled(vm, QEMU_DOMAIN_NS_MOUNT))
return 0;
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index 579b3c3713..20e90026e1 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -5482,7 +5482,7 @@ qemuProcessStartValidate(virQEMUDriverPtr driver,
if (ARCH_IS_X86(vm->def->os.arch) &&
!virQEMUCapsGet(qemuCaps, QEMU_CAPS_CPU_UNAVAILABLE_FEATURES)) {
- VIR_AUTOSTRINGLIST features = NULL;
+ g_auto(GStrv) features = NULL;
int n;
if ((n = virCPUDefCheckFeatures(vm->def->cpu,
@@ -6181,7 +6181,7 @@ qemuProcessUpdateGuestCPU(virDomainDefPtr def,
return -1;
if (ARCH_IS_X86(def->os.arch)) {
- VIR_AUTOSTRINGLIST features = NULL;
+ g_auto(GStrv) features = NULL;
if (virQEMUCapsGetCPUFeatures(qemuCaps, def->virtType, false, &features)
< 0)
return -1;
diff --git a/src/qemu/qemu_qapi.c b/src/qemu/qemu_qapi.c
index 3f2c52f69d..b41016f7d8 100644
--- a/src/qemu/qemu_qapi.c
+++ b/src/qemu/qemu_qapi.c
@@ -432,7 +432,7 @@ virQEMUQAPISchemaPathGet(const char *query,
GHashTable *schema,
virJSONValuePtr *entry)
{
- VIR_AUTOSTRINGLIST elems = NULL;
+ g_auto(GStrv) elems = NULL;
struct virQEMUQAPISchemaTraverseContext ctxt;
const char *cmdname;
int rc;
diff --git a/src/qemu/qemu_vhost_user.c b/src/qemu/qemu_vhost_user.c
index 260f3cd550..0a69d690ca 100644
--- a/src/qemu/qemu_vhost_user.c
+++ b/src/qemu/qemu_vhost_user.c
@@ -242,7 +242,7 @@ qemuVhostUserFetchParsedConfigs(bool privileged,
qemuVhostUserPtr **vhostuserRet,
char ***pathsRet)
{
- VIR_AUTOSTRINGLIST paths = NULL;
+ g_auto(GStrv) paths = NULL;
size_t npaths;
qemuVhostUserPtr *vus = NULL;
size_t i;
diff --git a/src/rpc/virnetsocket.c b/src/rpc/virnetsocket.c
index fc9dd023da..e56d43ba85 100644
--- a/src/rpc/virnetsocket.c
+++ b/src/rpc/virnetsocket.c
@@ -920,7 +920,7 @@ virNetSocketNewConnectLibSSH2(const char *host,
int ret = -1;
int portN;
- VIR_AUTOSTRINGLIST authMethodList = NULL;
+ g_auto(GStrv) authMethodList = NULL;
char **authMethodNext;
/* port number will be verified while opening the socket */
@@ -1052,7 +1052,7 @@ virNetSocketNewConnectLibssh(const char *host,
int ret = -1;
int portN;
- VIR_AUTOSTRINGLIST authMethodList = NULL;
+ g_auto(GStrv) authMethodList = NULL;
char **authMethodNext;
/* port number will be verified while opening the socket */
diff --git a/src/storage/storage_backend_sheepdog.c
b/src/storage/storage_backend_sheepdog.c
index 12ff9f44d0..c5b7c568dd 100644
--- a/src/storage/storage_backend_sheepdog.c
+++ b/src/storage/storage_backend_sheepdog.c
@@ -139,8 +139,8 @@ virStorageBackendSheepdogRefreshAllVol(virStoragePoolObjPtr pool)
{
size_t i;
g_autofree char *output = NULL;
- VIR_AUTOSTRINGLIST lines = NULL;
- VIR_AUTOSTRINGLIST cells = NULL;
+ g_auto(GStrv) lines = NULL;
+ g_auto(GStrv) cells = NULL;
g_autoptr(virCommand) cmd = NULL;
cmd = virCommandNewArgList(SHEEPDOGCLI, "vdi", "list",
"-r", NULL);
diff --git a/src/storage/storage_backend_zfs.c b/src/storage/storage_backend_zfs.c
index 4a89f98350..31ffcc6f15 100644
--- a/src/storage/storage_backend_zfs.c
+++ b/src/storage/storage_backend_zfs.c
@@ -101,8 +101,8 @@ virStorageBackendZFSParseVol(virStoragePoolObjPtr pool,
bool is_new_vol = false;
virStorageVolDefPtr volume = NULL;
virStoragePoolDefPtr def = virStoragePoolObjGetDef(pool);
- VIR_AUTOSTRINGLIST tokens = NULL;
- VIR_AUTOSTRINGLIST name_tokens = NULL;
+ g_auto(GStrv) tokens = NULL;
+ g_auto(GStrv) name_tokens = NULL;
if (!(tokens = virStringSplitCount(volume_string, "\t", 0, &count)))
return -1;
@@ -169,7 +169,7 @@ virStorageBackendZFSFindVols(virStoragePoolObjPtr pool,
{
virStoragePoolDefPtr def = virStoragePoolObjGetDef(pool);
size_t i;
- VIR_AUTOSTRINGLIST lines = NULL;
+ g_auto(GStrv) lines = NULL;
g_autoptr(virCommand) cmd = NULL;
g_autofree char *volumes_list = NULL;
@@ -216,9 +216,9 @@ virStorageBackendZFSRefreshPool(virStoragePoolObjPtr pool
G_GNUC_UNUSED)
char *zpool_props = NULL;
size_t i;
g_autoptr(virCommand) cmd = NULL;
- VIR_AUTOSTRINGLIST lines = NULL;
- VIR_AUTOSTRINGLIST tokens = NULL;
- VIR_AUTOSTRINGLIST name_tokens = NULL;
+ g_auto(GStrv) lines = NULL;
+ g_auto(GStrv) tokens = NULL;
+ g_auto(GStrv) name_tokens = NULL;
/**
* $ zpool get -Hp health,size,free,allocated test
diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c
index 13df10e507..15071d8b1b 100644
--- a/src/util/vircgroup.c
+++ b/src/util/vircgroup.c
@@ -1140,7 +1140,7 @@ virCgroupEnableMissingControllers(char *path,
virCgroupPtr *group)
{
g_autoptr(virCgroup) parent = NULL;
- VIR_AUTOSTRINGLIST tokens = virStringSplit(path, "/", 0);
+ g_auto(GStrv) tokens = virStringSplit(path, "/", 0);
size_t i;
if (virCgroupNew("/", controllers, &parent) < 0)
diff --git a/src/util/vircommand.c b/src/util/vircommand.c
index e47dd6b932..c3a98bbeac 100644
--- a/src/util/vircommand.c
+++ b/src/util/vircommand.c
@@ -3201,7 +3201,7 @@ virCommandRunRegex(virCommandPtr cmd,
int totgroups = 0, ngroup = 0;
char **groups;
g_autofree char *outbuf = NULL;
- VIR_AUTOSTRINGLIST lines = NULL;
+ g_auto(GStrv) lines = NULL;
int ret = -1;
/* Compile all regular expressions */
diff --git a/src/util/virdevmapper.c b/src/util/virdevmapper.c
index c4719d0670..15a7eb9fde 100644
--- a/src/util/virdevmapper.c
+++ b/src/util/virdevmapper.c
@@ -54,7 +54,7 @@ static int
virDevMapperGetMajor(unsigned int *major)
{
g_autofree char *buf = NULL;
- VIR_AUTOSTRINGLIST lines = NULL;
+ g_auto(GStrv) lines = NULL;
size_t i;
if (!virFileExists(CONTROL_PATH))
@@ -223,7 +223,7 @@ virDevMapperGetTargetsImpl(int controlFD,
g_autofree char *buf = NULL;
struct dm_ioctl dm;
struct dm_target_deps *deps = NULL;
- VIR_AUTOSTRINGLIST devPaths = NULL;
+ g_auto(GStrv) devPaths = NULL;
size_t i;
memset(&dm, 0, sizeof(dm));
@@ -265,7 +265,7 @@ virDevMapperGetTargetsImpl(int controlFD,
}
for (i = 0; i < deps->count; i++) {
- VIR_AUTOSTRINGLIST tmpPaths = NULL;
+ g_auto(GStrv) tmpPaths = NULL;
if (virDevMapperGetTargetsImpl(controlFD, devPaths[i], &tmpPaths, ttl - 1)
< 0)
return -1;
diff --git a/src/util/virfile.c b/src/util/virfile.c
index f57272ca2f..f7283fa72f 100644
--- a/src/util/virfile.c
+++ b/src/util/virfile.c
@@ -1619,7 +1619,7 @@ char *
virFindFileInPath(const char *file)
{
const char *origpath = NULL;
- VIR_AUTOSTRINGLIST paths = NULL;
+ g_auto(GStrv) paths = NULL;
char **pathiter;
if (file == NULL)
diff --git a/src/util/virfirewall.c b/src/util/virfirewall.c
index 21dea3013a..b84f0f5f48 100644
--- a/src/util/virfirewall.c
+++ b/src/util/virfirewall.c
@@ -686,7 +686,7 @@ virFirewallApplyRule(virFirewallPtr firewall,
{
g_autofree char *output = NULL;
g_autofree char *str = virFirewallRuleToString(rule);
- VIR_AUTOSTRINGLIST lines = NULL;
+ g_auto(GStrv) lines = NULL;
VIR_INFO("Applying rule '%s'", NULLSTR(str));
if (rule->ignoreErrors)
diff --git a/src/util/virhook.c b/src/util/virhook.c
index aad3e667d3..05d46f259e 100644
--- a/src/util/virhook.c
+++ b/src/util/virhook.c
@@ -343,7 +343,7 @@ virHookCall(int driver,
struct dirent *entry;
g_autofree char *path = NULL;
g_autofree char *dir_path = NULL;
- VIR_AUTOSTRINGLIST entries = NULL;
+ g_auto(GStrv) entries = NULL;
const char *drvstr;
const char *opstr;
const char *subopstr;
diff --git a/src/util/virjson.c b/src/util/virjson.c
index 4f92464421..c80c2f1ecb 100644
--- a/src/util/virjson.c
+++ b/src/util/virjson.c
@@ -2112,7 +2112,7 @@ virJSONValueObjectDeflattenWorker(const char *key,
virJSONValuePtr retobj = opaque;
g_autoptr(virJSONValue) newval = NULL;
virJSONValuePtr existobj;
- VIR_AUTOSTRINGLIST tokens = NULL;
+ g_auto(GStrv) tokens = NULL;
size_t ntokens = 0;
/* non-nested keys only need to be copied */
diff --git a/src/util/virprocess.c b/src/util/virprocess.c
index dccfc2558e..0523bf9afb 100644
--- a/src/util/virprocess.c
+++ b/src/util/virprocess.c
@@ -985,7 +985,7 @@ int virProcessGetStartTime(pid_t pid,
int len;
g_autofree char *filename = NULL;
g_autofree char *buf = NULL;
- VIR_AUTOSTRINGLIST tokens = NULL;
+ g_auto(GStrv) tokens = NULL;
filename = g_strdup_printf("/proc/%llu/stat", (long long)pid);
diff --git a/src/util/virstoragefile.c b/src/util/virstoragefile.c
index 35e6dcf5de..fac93118fd 100644
--- a/src/util/virstoragefile.c
+++ b/src/util/virstoragefile.c
@@ -1503,7 +1503,7 @@ virStorageFileParseBackingStoreStr(const char *str,
size_t nstrings;
unsigned int idx = 0;
char *suffix;
- VIR_AUTOSTRINGLIST strings = NULL;
+ g_auto(GStrv) strings = NULL;
*chainIndex = 0;
@@ -2778,7 +2778,7 @@ virStorageSourceParseBackingURI(virStorageSourcePtr src,
{
g_autoptr(virURI) uri = NULL;
const char *path = NULL;
- VIR_AUTOSTRINGLIST scheme = NULL;
+ g_auto(GStrv) scheme = NULL;
if (!(uri = virURIParse(uristr))) {
virReportError(VIR_ERR_INTERNAL_ERROR,
@@ -2880,7 +2880,7 @@ virStorageSourceRBDAddHost(virStorageSourcePtr src,
{
char *port;
size_t skip;
- VIR_AUTOSTRINGLIST parts = NULL;
+ g_auto(GStrv) parts = NULL;
if (VIR_EXPAND_N(src->hosts, src->nhosts, 1) < 0)
return -1;
@@ -3220,7 +3220,7 @@ virStorageSourceParseBackingJSONUriCookies(virStorageSourcePtr src,
const char *jsonstr)
{
const char *cookiestr;
- VIR_AUTOSTRINGLIST cookies = NULL;
+ g_auto(GStrv) cookies = NULL;
size_t ncookies = 0;
size_t i;
@@ -4512,7 +4512,7 @@ int
virStorageFileCheckCompat(const char *compat)
{
unsigned int result;
- VIR_AUTOSTRINGLIST version = NULL;
+ g_auto(GStrv) version = NULL;
if (!compat)
return 0;
diff --git a/src/util/virsystemd.c b/src/util/virsystemd.c
index de8763033d..edd29f0fdd 100644
--- a/src/util/virsystemd.c
+++ b/src/util/virsystemd.c
@@ -681,7 +681,7 @@ virSystemdActivationInitFromNames(virSystemdActivationPtr act,
int nfds,
const char *fdnames)
{
- VIR_AUTOSTRINGLIST fdnamelistptr = NULL;
+ g_auto(GStrv) fdnamelistptr = NULL;
char **fdnamelist;
size_t nfdnames;
size_t i;
diff --git a/src/vmx/vmx.c b/src/vmx/vmx.c
index 0d79b8f0ec..b86dbe9ca2 100644
--- a/src/vmx/vmx.c
+++ b/src/vmx/vmx.c
@@ -1577,7 +1577,7 @@ virVMXParseConfig(virVMXContext *ctx,
}
if (sched_cpu_affinity != NULL && STRCASENEQ(sched_cpu_affinity,
"all")) {
- VIR_AUTOSTRINGLIST afflist = NULL;
+ g_auto(GStrv) afflist = NULL;
char **aff;
size_t naffs;
diff --git a/tests/qemufirmwaretest.c b/tests/qemufirmwaretest.c
index 2b56e5ac82..ced9d53260 100644
--- a/tests/qemufirmwaretest.c
+++ b/tests/qemufirmwaretest.c
@@ -56,7 +56,7 @@ static int
testFWPrecedence(const void *opaque G_GNUC_UNUSED)
{
g_autofree char *fakehome = NULL;
- VIR_AUTOSTRINGLIST fwList = NULL;
+ g_auto(GStrv) fwList = NULL;
size_t nfwList;
size_t i;
const char *expected[] = {
diff --git a/tests/qemusecuritytest.c b/tests/qemusecuritytest.c
index dc3deb37d2..1750018137 100644
--- a/tests/qemusecuritytest.c
+++ b/tests/qemusecuritytest.c
@@ -87,7 +87,7 @@ testDomain(const void *opaque)
{
const struct testData *data = opaque;
g_autoptr(virDomainObj) vm = NULL;
- VIR_AUTOSTRINGLIST notRestored = NULL;
+ g_auto(GStrv) notRestored = NULL;
size_t i;
int ret = -1;
diff --git a/tests/qemuvhostusertest.c b/tests/qemuvhostusertest.c
index 273db560e3..17e4e83b99 100644
--- a/tests/qemuvhostusertest.c
+++ b/tests/qemuvhostusertest.c
@@ -56,7 +56,7 @@ static int
testVUPrecedence(const void *opaque G_GNUC_UNUSED)
{
g_autofree char *fakehome = NULL;
- VIR_AUTOSTRINGLIST vuList = NULL;
+ g_auto(GStrv) vuList = NULL;
size_t nvuList;
size_t i;
const char *expected[] = {
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index 42d147243e..409680c84e 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -130,7 +130,7 @@ static virStorageVolPtr
fakeStorageVolLookupByName(virStoragePoolPtr pool,
const char *name)
{
- VIR_AUTOSTRINGLIST volinfo = NULL;
+ g_auto(GStrv) volinfo = NULL;
virStorageVolPtr ret = NULL;
if (STREQ(pool->name, "inactive")) {
@@ -517,7 +517,7 @@ testCompareXMLToArgvValidateSchema(virQEMUDriverPtr drv,
struct testQemuInfo *info,
unsigned int flags)
{
- VIR_AUTOSTRINGLIST args = NULL;
+ g_auto(GStrv) args = NULL;
g_autoptr(virDomainObj) vm = NULL;
size_t nargs = 0;
size_t i;
diff --git a/tests/virfirewalltest.c b/tests/virfirewalltest.c
index 2670eb1561..9f95520859 100644
--- a/tests/virfirewalltest.c
+++ b/tests/virfirewalltest.c
@@ -102,7 +102,7 @@ VIR_MOCK_WRAP_RET_ARGS(g_dbus_connection_call_sync,
} else if (STREQ(bus_name, VIR_FIREWALL_FIREWALLD_SERVICE) &&
STREQ(method_name, "passthrough")) {
g_autoptr(GVariantIter) iter = NULL;
- VIR_AUTOSTRINGLIST args = NULL;
+ g_auto(GStrv) args = NULL;
size_t nargs = 0;
char *type = NULL;
char *item = NULL;
diff --git a/tools/virsh-completer-domain.c b/tools/virsh-completer-domain.c
index dad0ea6812..4a3459f12a 100644
--- a/tools/virsh-completer-domain.c
+++ b/tools/virsh-completer-domain.c
@@ -42,7 +42,7 @@ virshDomainNameCompleter(vshControl *ctl,
int ndomains = 0;
size_t i = 0;
char **ret = NULL;
- VIR_AUTOSTRINGLIST tmp = NULL;
+ g_auto(GStrv) tmp = NULL;
virCheckFlags(VIR_CONNECT_LIST_DOMAINS_ACTIVE |
VIR_CONNECT_LIST_DOMAINS_INACTIVE |
@@ -89,7 +89,7 @@ virshDomainUUIDCompleter(vshControl *ctl,
int ndomains = 0;
size_t i = 0;
char **ret = NULL;
- VIR_AUTOSTRINGLIST tmp = NULL;
+ g_auto(GStrv) tmp = NULL;
virCheckFlags(VIR_CONNECT_LIST_DOMAINS_ACTIVE |
VIR_CONNECT_LIST_DOMAINS_INACTIVE |
@@ -142,7 +142,7 @@ virshDomainInterfaceCompleter(vshControl *ctl,
g_autofree xmlNodePtr *interfaces = NULL;
size_t i;
unsigned int domainXMLFlags = 0;
- VIR_AUTOSTRINGLIST tmp = NULL;
+ g_auto(GStrv) tmp = NULL;
virCheckFlags(VIRSH_DOMAIN_INTERFACE_COMPLETER_MAC, NULL);
@@ -189,7 +189,7 @@ virshDomainDiskTargetCompleter(vshControl *ctl,
g_autofree xmlNodePtr *disks = NULL;
int ndisks;
size_t i;
- VIR_AUTOSTRINGLIST tmp = NULL;
+ g_auto(GStrv) tmp = NULL;
virCheckFlags(0, NULL);
@@ -221,7 +221,7 @@ virshDomainEventNameCompleter(vshControl *ctl G_GNUC_UNUSED,
unsigned int flags)
{
size_t i = 0;
- VIR_AUTOSTRINGLIST tmp = NULL;
+ g_auto(GStrv) tmp = NULL;
virCheckFlags(0, NULL);
@@ -249,7 +249,7 @@ virshDomainInterfaceStateCompleter(vshControl *ctl,
g_autofree xmlNodePtr *interfaces = NULL;
g_autofree char *xpath = NULL;
g_autofree char *state = NULL;
- VIR_AUTOSTRINGLIST tmp = NULL;
+ g_auto(GStrv) tmp = NULL;
virCheckFlags(0, NULL);
@@ -303,7 +303,7 @@ virshDomainDeviceAliasCompleter(vshControl *ctl,
g_autofree xmlNodePtr *aliases = NULL;
size_t i;
unsigned int domainXMLFlags = 0;
- VIR_AUTOSTRINGLIST tmp = NULL;
+ g_auto(GStrv) tmp = NULL;
virCheckFlags(0, NULL);
@@ -392,7 +392,7 @@ virshDomainPerfEnableCompleter(vshControl *ctl,
unsigned int flags)
{
size_t i = 0;
- VIR_AUTOSTRINGLIST events = NULL;
+ g_auto(GStrv) events = NULL;
const char *event = NULL;
virCheckFlags(0, NULL);
@@ -415,7 +415,7 @@ virshDomainPerfDisableCompleter(vshControl *ctl,
unsigned int flags)
{
size_t i = 0;
- VIR_AUTOSTRINGLIST events = NULL;
+ g_auto(GStrv) events = NULL;
const char *event = NULL;
virCheckFlags(0, NULL);
@@ -443,7 +443,7 @@ virshDomainIOThreadIdCompleter(vshControl *ctl,
size_t i;
int rc;
char **ret = NULL;
- VIR_AUTOSTRINGLIST tmp = NULL;
+ g_auto(GStrv) tmp = NULL;
virCheckFlags(0, NULL);
@@ -479,7 +479,7 @@ virshDomainVcpuCompleter(vshControl *ctl,
int nvcpus = 0;
unsigned int id;
char **ret = NULL;
- VIR_AUTOSTRINGLIST tmp = NULL;
+ g_auto(GStrv) tmp = NULL;
virCheckFlags(0, NULL);
@@ -519,7 +519,7 @@ virshDomainVcpulistCompleter(vshControl *ctl,
xmlXPathContextPtr ctxt = NULL;
int nvcpus = 0;
unsigned int id;
- VIR_AUTOSTRINGLIST vcpulist = NULL;
+ g_auto(GStrv) vcpulist = NULL;
const char *vcpuid = NULL;
char **ret = NULL;
@@ -564,7 +564,7 @@ virshDomainCpulistCompleter(vshControl *ctl,
int cpunum;
g_autofree unsigned char *cpumap = NULL;
unsigned int online;
- VIR_AUTOSTRINGLIST cpulist = NULL;
+ g_auto(GStrv) cpulist = NULL;
const char *cpuid = NULL;
virCheckFlags(0, NULL);
@@ -596,7 +596,7 @@ virshDomainVcpulistViaAgentCompleter(vshControl *ctl,
unsigned int nparams = 0;
size_t i;
int nvcpus;
- VIR_AUTOSTRINGLIST cpulist = NULL;
+ g_auto(GStrv) cpulist = NULL;
const char *vcpuid = NULL;
char **ret = NULL;
@@ -677,7 +677,7 @@ virshDomainConsoleCompleter(vshControl *ctl,
g_autofree xmlNodePtr *parallels = NULL;
size_t i;
size_t offset = 0;
- VIR_AUTOSTRINGLIST tmp = NULL;
+ g_auto(GStrv) tmp = NULL;
virCheckFlags(0, NULL);
@@ -722,7 +722,7 @@ virshDomainSignalCompleter(vshControl *ctl G_GNUC_UNUSED,
const vshCmd *cmd G_GNUC_UNUSED,
unsigned int flags)
{
- VIR_AUTOSTRINGLIST tmp = NULL;
+ g_auto(GStrv) tmp = NULL;
size_t i = 0;
virCheckFlags(0, NULL);
@@ -743,7 +743,7 @@ virshDomainLifecycleCompleter(vshControl *ctl G_GNUC_UNUSED,
const vshCmd *cmd G_GNUC_UNUSED,
unsigned int flags)
{
- VIR_AUTOSTRINGLIST tmp = NULL;
+ g_auto(GStrv) tmp = NULL;
size_t i = 0;
virCheckFlags(0, NULL);
@@ -764,7 +764,7 @@ virshDomainLifecycleActionCompleter(vshControl *ctl G_GNUC_UNUSED,
const vshCmd *cmd G_GNUC_UNUSED,
unsigned int flags)
{
- VIR_AUTOSTRINGLIST tmp = NULL;
+ g_auto(GStrv) tmp = NULL;
size_t i = 0;
virCheckFlags(0, NULL);
diff --git a/tools/virsh-completer-host.c b/tools/virsh-completer-host.c
index 4c277f2ada..9d3bdb2024 100644
--- a/tools/virsh-completer-host.c
+++ b/tools/virsh-completer-host.c
@@ -63,7 +63,7 @@ virshAllocpagesPagesizeCompleter(vshControl *ctl,
bool cellno = vshCommandOptBool(cmd, "cellno");
g_autofree char *path = NULL;
g_autofree char *cap_xml = NULL;
- VIR_AUTOSTRINGLIST tmp = NULL;
+ g_auto(GStrv) tmp = NULL;
virCheckFlags(0, NULL);
@@ -110,7 +110,7 @@ virshCellnoCompleter(vshControl *ctl,
g_autoptr(xmlDoc) doc = NULL;
size_t i = 0;
g_autofree char *cap_xml = NULL;
- VIR_AUTOSTRINGLIST tmp = NULL;
+ g_auto(GStrv) tmp = NULL;
virCheckFlags(0, NULL);
@@ -144,7 +144,7 @@ virshNodeCpuCompleter(vshControl *ctl,
unsigned int flags)
{
virshControlPtr priv = ctl->privData;
- VIR_AUTOSTRINGLIST tmp = NULL;
+ g_auto(GStrv) tmp = NULL;
size_t i;
int cpunum;
size_t offset = 0;
diff --git a/tools/virsh-completer-interface.c b/tools/virsh-completer-interface.c
index 1eea2d462a..db819ae689 100644
--- a/tools/virsh-completer-interface.c
+++ b/tools/virsh-completer-interface.c
@@ -38,7 +38,7 @@ virshInterfaceStringHelper(vshControl *ctl,
virInterfacePtr *ifaces = NULL;
int nifaces = 0;
size_t i = 0;
- VIR_AUTOSTRINGLIST tmp = NULL;
+ g_auto(GStrv) tmp = NULL;
virCheckFlags(VIR_CONNECT_LIST_INTERFACES_ACTIVE |
VIR_CONNECT_LIST_INTERFACES_INACTIVE,
diff --git a/tools/virsh-completer-network.c b/tools/virsh-completer-network.c
index 3094b9d5d6..5f5f527fa4 100644
--- a/tools/virsh-completer-network.c
+++ b/tools/virsh-completer-network.c
@@ -36,7 +36,7 @@ virshNetworkNameCompleter(vshControl *ctl,
int nnets = 0;
size_t i = 0;
char **ret = NULL;
- VIR_AUTOSTRINGLIST tmp = NULL;
+ g_auto(GStrv) tmp = NULL;
virCheckFlags(VIR_CONNECT_LIST_NETWORKS_INACTIVE |
VIR_CONNECT_LIST_NETWORKS_ACTIVE |
@@ -72,7 +72,7 @@ virshNetworkEventNameCompleter(vshControl *ctl G_GNUC_UNUSED,
unsigned int flags)
{
size_t i = 0;
- VIR_AUTOSTRINGLIST tmp = NULL;
+ g_auto(GStrv) tmp = NULL;
virCheckFlags(0, NULL);
@@ -145,7 +145,7 @@ virshNetworkUUIDCompleter(vshControl *ctl,
int nnets = 0;
size_t i = 0;
char **ret = NULL;
- VIR_AUTOSTRINGLIST tmp = NULL;
+ g_auto(GStrv) tmp = NULL;
virCheckFlags(0, NULL);
@@ -187,7 +187,7 @@ virshNetworkDhcpMacCompleter(vshControl *ctl,
int nleases;
size_t i = 0;
char **ret = NULL;
- VIR_AUTOSTRINGLIST tmp = NULL;
+ g_auto(GStrv) tmp = NULL;
virCheckFlags(0, NULL);
diff --git a/tools/virsh-completer-nodedev.c b/tools/virsh-completer-nodedev.c
index a9fc37733c..1165e0680c 100644
--- a/tools/virsh-completer-nodedev.c
+++ b/tools/virsh-completer-nodedev.c
@@ -37,7 +37,7 @@ virshNodeDeviceNameCompleter(vshControl *ctl,
int ndevs = 0;
size_t i = 0;
char **ret = NULL;
- VIR_AUTOSTRINGLIST tmp = NULL;
+ g_auto(GStrv) tmp = NULL;
virCheckFlags(0, NULL);
@@ -70,7 +70,7 @@ virshNodeDeviceEventNameCompleter(vshControl *ctl G_GNUC_UNUSED,
unsigned int flags)
{
size_t i = 0;
- VIR_AUTOSTRINGLIST tmp = NULL;
+ g_auto(GStrv) tmp = NULL;
virCheckFlags(0, NULL);
@@ -88,7 +88,7 @@ virshNodeDeviceCapabilityNameCompleter(vshControl *ctl,
const vshCmd *cmd,
unsigned int flags)
{
- VIR_AUTOSTRINGLIST tmp = NULL;
+ g_auto(GStrv) tmp = NULL;
const char *cap_str = NULL;
size_t i = 0;
diff --git a/tools/virsh-completer-nwfilter.c b/tools/virsh-completer-nwfilter.c
index b1aa084b49..13caefff1e 100644
--- a/tools/virsh-completer-nwfilter.c
+++ b/tools/virsh-completer-nwfilter.c
@@ -35,7 +35,7 @@ virshNWFilterNameCompleter(vshControl *ctl,
int nnwfilters = 0;
size_t i = 0;
char **ret = NULL;
- VIR_AUTOSTRINGLIST tmp = NULL;
+ g_auto(GStrv) tmp = NULL;
virCheckFlags(0, NULL);
@@ -72,7 +72,7 @@ virshNWFilterBindingNameCompleter(vshControl *ctl,
int nbindings = 0;
size_t i = 0;
char **ret = NULL;
- VIR_AUTOSTRINGLIST tmp = NULL;
+ g_auto(GStrv) tmp = NULL;
virCheckFlags(0, NULL);
diff --git a/tools/virsh-completer-pool.c b/tools/virsh-completer-pool.c
index ecf2514a59..4a0eb1582d 100644
--- a/tools/virsh-completer-pool.c
+++ b/tools/virsh-completer-pool.c
@@ -37,7 +37,7 @@ virshStoragePoolNameCompleter(vshControl *ctl,
int npools = 0;
size_t i = 0;
char **ret = NULL;
- VIR_AUTOSTRINGLIST tmp = NULL;
+ g_auto(GStrv) tmp = NULL;
virCheckFlags(VIR_CONNECT_LIST_STORAGE_POOLS_INACTIVE |
VIR_CONNECT_LIST_STORAGE_POOLS_ACTIVE |
@@ -73,7 +73,7 @@ virshPoolEventNameCompleter(vshControl *ctl G_GNUC_UNUSED,
unsigned int flags)
{
size_t i = 0;
- VIR_AUTOSTRINGLIST tmp = NULL;
+ g_auto(GStrv) tmp = NULL;
virCheckFlags(0, NULL);
@@ -91,7 +91,7 @@ virshPoolTypeCompleter(vshControl *ctl,
const vshCmd *cmd,
unsigned int flags)
{
- VIR_AUTOSTRINGLIST tmp = NULL;
+ g_auto(GStrv) tmp = NULL;
const char *type_str = NULL;
size_t i = 0;
diff --git a/tools/virsh-completer-secret.c b/tools/virsh-completer-secret.c
index 940d65a322..75ebe7b4e9 100644
--- a/tools/virsh-completer-secret.c
+++ b/tools/virsh-completer-secret.c
@@ -37,7 +37,7 @@ virshSecretUUIDCompleter(vshControl *ctl,
int nsecrets = 0;
size_t i = 0;
char **ret = NULL;
- VIR_AUTOSTRINGLIST tmp = NULL;
+ g_auto(GStrv) tmp = NULL;
virCheckFlags(0, NULL);
@@ -73,7 +73,7 @@ virshSecretEventNameCompleter(vshControl *ctl G_GNUC_UNUSED,
unsigned int flags)
{
size_t i;
- VIR_AUTOSTRINGLIST tmp = NULL;
+ g_auto(GStrv) tmp = NULL;
virCheckFlags(0, NULL);
diff --git a/tools/virsh-completer-snapshot.c b/tools/virsh-completer-snapshot.c
index f6aa405ea3..e64b2442ca 100644
--- a/tools/virsh-completer-snapshot.c
+++ b/tools/virsh-completer-snapshot.c
@@ -38,7 +38,7 @@ virshSnapshotNameCompleter(vshControl *ctl,
int nsnapshots = 0;
size_t i = 0;
char **ret = NULL;
- VIR_AUTOSTRINGLIST tmp = NULL;
+ g_auto(GStrv) tmp = NULL;
virCheckFlags(0, NULL);
diff --git a/tools/virsh-completer-volume.c b/tools/virsh-completer-volume.c
index 29330f5bd8..2ac8cd25cc 100644
--- a/tools/virsh-completer-volume.c
+++ b/tools/virsh-completer-volume.c
@@ -38,7 +38,7 @@ virshStorageVolNameCompleter(vshControl *ctl,
int nvols = 0;
size_t i = 0;
char **ret = NULL;
- VIR_AUTOSTRINGLIST tmp = NULL;
+ g_auto(GStrv) tmp = NULL;
virCheckFlags(0, NULL);
diff --git a/tools/virsh-completer.c b/tools/virsh-completer.c
index a05ce0bfca..c7aed7c779 100644
--- a/tools/virsh-completer.c
+++ b/tools/virsh-completer.c
@@ -89,8 +89,8 @@ virshCommaStringListComplete(const char *input,
{
const size_t optionsLen = virStringListLength(options);
g_autofree char *inputCopy = NULL;
- VIR_AUTOSTRINGLIST inputList = NULL;
- VIR_AUTOSTRINGLIST ret = NULL;
+ g_auto(GStrv) inputList = NULL;
+ g_auto(GStrv) ret = NULL;
size_t nret = 0;
size_t i;
diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
index 655bac3315..51a9fd90d1 100644
--- a/tools/virsh-domain.c
+++ b/tools/virsh-domain.c
@@ -14288,7 +14288,7 @@ cmdGetUserSSHKeys(vshControl *ctl, const vshCmd *cmd)
{
virDomainPtr dom = NULL;
const char *user;
- VIR_AUTOSTRINGLIST keys = NULL;
+ g_auto(GStrv) keys = NULL;
int nkeys = 0;
size_t i;
const unsigned int flags = 0;
@@ -14358,7 +14358,7 @@ cmdSetUserSSHKeys(vshControl *ctl, const vshCmd *cmd)
const char *user;
const char *from;
g_autofree char *buffer = NULL;
- VIR_AUTOSTRINGLIST keys = NULL;
+ g_auto(GStrv) keys = NULL;
int nkeys = 0;
unsigned int flags = 0;
bool ret = false;
--
2.26.2