tools: use g_steal_pointer instead of VIR_STEAL_PTR

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Ján Tomko 2019-10-16 13:43:36 +02:00
parent 72a1bb8e4c
commit 4f7c65da27
13 changed files with 24 additions and 24 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -62,7 +62,7 @@ virshSnapshotNameCompleter(vshControl *ctl,
goto cleanup;
}
VIR_STEAL_PTR(ret, tmp);
ret = g_steal_pointer(&tmp);
cleanup:
virshDomainFree(dom);

View File

@ -62,7 +62,7 @@ virshStorageVolNameCompleter(vshControl *ctl,
goto cleanup;
}
VIR_STEAL_PTR(ret, tmp);
ret = g_steal_pointer(&tmp);
cleanup:
virStoragePoolFree(pool);

View File

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

View File

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

View File

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