diff --git a/tools/virsh-completer-domain.c b/tools/virsh-completer-domain.c index 16c209ab36ee67cdd560c0b0353f1fd9bb7fe4d6..bb06f468d788dcc780aebf4c8d005b0cd84171cc 100644 --- a/tools/virsh-completer-domain.c +++ b/tools/virsh-completer-domain.c @@ -66,7 +66,7 @@ virshDomainNameCompleter(vshControl *ctl, goto cleanup; } - VIR_STEAL_PTR(ret, tmp); + ret = g_steal_pointer(&tmp); cleanup: for (i = 0; i < ndomains; i++) @@ -122,7 +122,7 @@ virshDomainInterfaceCompleter(vshControl *ctl, return NULL; } - VIR_STEAL_PTR(ret, tmp); + ret = g_steal_pointer(&tmp); return ret; } @@ -162,7 +162,7 @@ virshDomainDiskTargetCompleter(vshControl *ctl, return NULL; } - VIR_STEAL_PTR(ret, tmp); + ret = g_steal_pointer(&tmp); return ret; } @@ -186,7 +186,7 @@ virshDomainEventNameCompleter(vshControl *ctl G_GNUC_UNUSED, return NULL; } - VIR_STEAL_PTR(ret, tmp); + ret = g_steal_pointer(&tmp); return ret; } @@ -249,7 +249,7 @@ virshDomainInterfaceStateCompleter(vshControl *ctl, return NULL; } - VIR_STEAL_PTR(ret, tmp); + ret = g_steal_pointer(&tmp); return ret; } @@ -292,7 +292,7 @@ virshDomainDeviceAliasCompleter(vshControl *ctl, return NULL; } - VIR_STEAL_PTR(ret, tmp); + ret = g_steal_pointer(&tmp); return ret; } diff --git a/tools/virsh-completer-host.c b/tools/virsh-completer-host.c index ce43818be373f88e668b1f7e0c2ba1f268ba1654..42e59a66568d3c838627435219a264ee3751b75f 100644 --- a/tools/virsh-completer-host.c +++ b/tools/virsh-completer-host.c @@ -100,7 +100,7 @@ virshAllocpagesPagesizeCompleter(vshControl *ctl, return NULL; } - VIR_STEAL_PTR(ret, tmp); + ret = g_steal_pointer(&tmp); return ret; } @@ -143,6 +143,6 @@ virshCellnoCompleter(vshControl *ctl, return NULL; } - VIR_STEAL_PTR(ret, tmp); + ret = g_steal_pointer(&tmp); return ret; } diff --git a/tools/virsh-completer-interface.c b/tools/virsh-completer-interface.c index 24a69d30b96fc9d9b96b557196bfe5c994a0c237..6fae0f65841939e06225b7436fdb87a27ae7ea75 100644 --- a/tools/virsh-completer-interface.c +++ b/tools/virsh-completer-interface.c @@ -57,7 +57,7 @@ virshInterfaceNameCompleter(vshControl *ctl, goto cleanup; } - VIR_STEAL_PTR(ret, tmp); + ret = g_steal_pointer(&tmp); cleanup: for (i = 0; i < nifaces; i++) diff --git a/tools/virsh-completer-network.c b/tools/virsh-completer-network.c index 404260b20cb30dc5e2a503e4738432de64a0e68d..a3d8b71d194da0d710e85570b22e9683d0a220c6 100644 --- a/tools/virsh-completer-network.c +++ b/tools/virsh-completer-network.c @@ -59,7 +59,7 @@ virshNetworkNameCompleter(vshControl *ctl, goto cleanup; } - VIR_STEAL_PTR(ret, tmp); + ret = g_steal_pointer(&tmp); cleanup: for (i = 0; i < nnets; i++) @@ -88,7 +88,7 @@ virshNetworkEventNameCompleter(vshControl *ctl G_GNUC_UNUSED, goto cleanup; } - VIR_STEAL_PTR(ret, tmp); + ret = g_steal_pointer(&tmp); cleanup: return ret; diff --git a/tools/virsh-completer-nodedev.c b/tools/virsh-completer-nodedev.c index 9bd1d2094597a9296011d08f545c1fe12ddd7f5b..899c199902bb401130adb7abcc0e689130305a82 100644 --- a/tools/virsh-completer-nodedev.c +++ b/tools/virsh-completer-nodedev.c @@ -57,7 +57,7 @@ virshNodeDeviceNameCompleter(vshControl *ctl, goto cleanup; } - VIR_STEAL_PTR(ret, tmp); + ret = g_steal_pointer(&tmp); cleanup: for (i = 0; i < ndevs; i++) @@ -86,7 +86,7 @@ virshNodeDeviceEventNameCompleter(vshControl *ctl G_GNUC_UNUSED, return NULL; } - VIR_STEAL_PTR(ret, tmp); + ret = g_steal_pointer(&tmp); return ret; } diff --git a/tools/virsh-completer-nwfilter.c b/tools/virsh-completer-nwfilter.c index 5a86602101923594a112b3ff98e85feb3cf3c827..5029becf099eda11179777d658fc6c42fbcc9d91 100644 --- a/tools/virsh-completer-nwfilter.c +++ b/tools/virsh-completer-nwfilter.c @@ -55,7 +55,7 @@ virshNWFilterNameCompleter(vshControl *ctl, goto cleanup; } - VIR_STEAL_PTR(ret, tmp); + ret = g_steal_pointer(&tmp); cleanup: for (i = 0; i < nnwfilters; i++) @@ -95,7 +95,7 @@ virshNWFilterBindingNameCompleter(vshControl *ctl, goto cleanup; } - VIR_STEAL_PTR(ret, tmp); + ret = g_steal_pointer(&tmp); cleanup: for (i = 0; i < nbindings; i++) diff --git a/tools/virsh-completer-pool.c b/tools/virsh-completer-pool.c index e646d07e6573017b5ecae3bd05a2043ea78447d9..ceb73eed0682650eb055a369d900d31bf4765ab4 100644 --- a/tools/virsh-completer-pool.c +++ b/tools/virsh-completer-pool.c @@ -60,7 +60,7 @@ virshStoragePoolNameCompleter(vshControl *ctl, goto cleanup; } - VIR_STEAL_PTR(ret, tmp); + ret = g_steal_pointer(&tmp); cleanup: for (i = 0; i < npools; i++) @@ -89,7 +89,7 @@ virshPoolEventNameCompleter(vshControl *ctl G_GNUC_UNUSED, return NULL; } - VIR_STEAL_PTR(ret, tmp); + ret = g_steal_pointer(&tmp); return ret; } diff --git a/tools/virsh-completer-secret.c b/tools/virsh-completer-secret.c index 38403f275ac9c2019e65f4e48ef78b82c86eab42..a533ac178f969e478a0d3955e90612ae45780722 100644 --- a/tools/virsh-completer-secret.c +++ b/tools/virsh-completer-secret.c @@ -57,7 +57,7 @@ virshSecretUUIDCompleter(vshControl *ctl, goto cleanup; } - VIR_STEAL_PTR(ret, tmp); + ret = g_steal_pointer(&tmp); cleanup: for (i = 0; i < nsecrets; i++) @@ -86,6 +86,6 @@ virshSecretEventNameCompleter(vshControl *ctl G_GNUC_UNUSED, return NULL; } - VIR_STEAL_PTR(ret, tmp); + ret = g_steal_pointer(&tmp); return ret; } diff --git a/tools/virsh-completer-snapshot.c b/tools/virsh-completer-snapshot.c index cad56e2fbab2493527e79225a3b4ae19975537cc..14bd7bc6e4a93fcbd54f03a1de216525ada0439d 100644 --- a/tools/virsh-completer-snapshot.c +++ b/tools/virsh-completer-snapshot.c @@ -62,7 +62,7 @@ virshSnapshotNameCompleter(vshControl *ctl, goto cleanup; } - VIR_STEAL_PTR(ret, tmp); + ret = g_steal_pointer(&tmp); cleanup: virshDomainFree(dom); diff --git a/tools/virsh-completer-volume.c b/tools/virsh-completer-volume.c index 2df0077d7a4d21582dc807c23bdd9f4a3d7e2ceb..f14570f23d9e41bae3d862b10af5263d024ec0c0 100644 --- a/tools/virsh-completer-volume.c +++ b/tools/virsh-completer-volume.c @@ -62,7 +62,7 @@ virshStorageVolNameCompleter(vshControl *ctl, goto cleanup; } - VIR_STEAL_PTR(ret, tmp); + ret = g_steal_pointer(&tmp); cleanup: virStoragePoolFree(pool); diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index f46d30341d96670d9558abb78f072a9c0ffd73cb..3ba84514706a45b2202a7745a26e2f6762eea724 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -8441,7 +8441,7 @@ cmdDesc(vshControl *ctl, const vshCmd *cmd) } VIR_FREE(desc); - VIR_STEAL_PTR(desc, desc_edited); + desc = g_steal_pointer(&desc_edited); } if (virDomainSetMetadata(dom, type, desc, NULL, NULL, flags) < 0) { diff --git a/tools/virsh-snapshot.c b/tools/virsh-snapshot.c index b5e5c234cc380002d24a29fb5239e67879a1c346..eae19ecd27f971bbe713809711cb538b4496a33c 100644 --- a/tools/virsh-snapshot.c +++ b/tools/virsh-snapshot.c @@ -1380,7 +1380,7 @@ virshSnapshotListCollect(vshControl *ctl, virDomainPtr dom, virshSnapSorter); snaplist->nsnaps -= deleted; - VIR_STEAL_PTR(ret, snaplist); + ret = g_steal_pointer(&snaplist); cleanup: virshSnapshotListFree(snaplist); diff --git a/tools/vsh.c b/tools/vsh.c index a9b2a841221099fafbaeeaac0e67aef760e85bb0..ee675a63cc2e7d39661aab4a9a091c20c181b50f 100644 --- a/tools/vsh.c +++ b/tools/vsh.c @@ -2796,7 +2796,7 @@ vshCompleterFilter(char ***list, continue; } - VIR_STEAL_PTR(newList[newList_len], (*list)[i]); + newList[newList_len] = g_steal_pointer(&(*list)[i]); newList_len++; }