mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 11:22:23 +00:00
vbox: SnapshotConfAllChildren: reduce scope of tempSize
Signed-off-by: Ján Tomko <jtomko@redhat.com> Reviewed-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
parent
9e41a59ce5
commit
ad318a6c12
@ -454,7 +454,6 @@ virVBoxSnapshotConfAllChildren(virVBoxSnapshotConfHardDisk *disk,
|
|||||||
virVBoxSnapshotConfHardDisk ***list)
|
virVBoxSnapshotConfHardDisk ***list)
|
||||||
{
|
{
|
||||||
size_t returnSize = 0;
|
size_t returnSize = 0;
|
||||||
size_t tempSize = 0;
|
|
||||||
virVBoxSnapshotConfHardDisk **ret = NULL;
|
virVBoxSnapshotConfHardDisk **ret = NULL;
|
||||||
virVBoxSnapshotConfHardDisk **tempList = NULL;
|
virVBoxSnapshotConfHardDisk **tempList = NULL;
|
||||||
size_t i = 0;
|
size_t i = 0;
|
||||||
@ -463,7 +462,7 @@ virVBoxSnapshotConfAllChildren(virVBoxSnapshotConfHardDisk *disk,
|
|||||||
ret = g_new0(virVBoxSnapshotConfHardDisk *, 0);
|
ret = g_new0(virVBoxSnapshotConfHardDisk *, 0);
|
||||||
|
|
||||||
for (i = 0; i < disk->nchildren; i++) {
|
for (i = 0; i < disk->nchildren; i++) {
|
||||||
tempSize = virVBoxSnapshotConfAllChildren(disk->children[i], &tempList);
|
size_t tempSize = virVBoxSnapshotConfAllChildren(disk->children[i], &tempList);
|
||||||
VIR_EXPAND_N(ret, returnSize, tempSize);
|
VIR_EXPAND_N(ret, returnSize, tempSize);
|
||||||
|
|
||||||
for (j = 0; j < tempSize; j++)
|
for (j = 0; j < tempSize; j++)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user