If we are updating the current checkpoint when redefining by mentioning
the current checkpoint as a parent of the newly redefined one we don't
have to clear it first.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
if (def->parent.parent_name &&
(parent = virDomainCheckpointFindByName(vm->checkpoints,
def->parent.parent_name))) {
- if (parent == virDomainCheckpointGetCurrent(vm->checkpoints)) {
+ if (parent == virDomainCheckpointGetCurrent(vm->checkpoints))
*update_current = true;
- virDomainCheckpointSetCurrent(vm->checkpoints, NULL);
- }
}
other = virDomainCheckpointFindByName(vm->checkpoints, def->parent.name);