qemuSnapshotRedefine: Rename 'def' to 'snapdef'

'def' is commonly used to refer to domain definition. Most of the
snapshot code uses 'snapdef' for the snapshot definition.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Peter Krempa 2022-01-12 16:15:19 +01:00
parent 164aba8c4a
commit 56f4ec311f

View File

@ -1709,7 +1709,7 @@ qemuSnapshotCreateWriteMetadata(virDomainObj *vm,
static virDomainSnapshotPtr
qemuSnapshotRedefine(virDomainObj *vm,
virDomainPtr domain,
virDomainSnapshotDef *def,
virDomainSnapshotDef *snapdef,
virQEMUDriver *driver,
virQEMUDriverConfig *cfg,
unsigned int flags)
@ -1717,13 +1717,13 @@ qemuSnapshotRedefine(virDomainObj *vm,
virDomainMomentObj *snap = NULL;
virDomainSnapshotPtr ret = NULL;
if (virDomainSnapshotRedefinePrep(vm, &def, &snap,
if (virDomainSnapshotRedefinePrep(vm, &snapdef, &snap,
driver->xmlopt,
flags) < 0)
return NULL;
if (!snap) {
if (!(snap = virDomainSnapshotAssignDef(vm->snapshots, def)))
if (!(snap = virDomainSnapshotAssignDef(vm->snapshots, snapdef)))
return NULL;
}
/* XXX Should we validate that the redefined snapshot even