Use the appropriate type for the variable and fix all callers.
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
src/conf/snapshot_conf.c | 4 ++--
src/conf/snapshot_conf.h | 2 +-
src/qemu/qemu_snapshot.c | 2 +-
src/test/test_driver.c | 2 +-
4 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/conf/snapshot_conf.c b/src/conf/snapshot_conf.c
index d7e18596bc..f0ded7919c 100644
--- a/src/conf/snapshot_conf.c
+++ b/src/conf/snapshot_conf.c
@@ -473,7 +473,7 @@ virDomainSnapshotRedefineValidate(virDomainSnapshotDef *def,
virDomainXMLOption *xmlopt,
unsigned int flags)
{
- int align_location = VIR_DOMAIN_SNAPSHOT_LOCATION_INTERNAL;
+ virDomainSnapshotLocation align_location = VIR_DOMAIN_SNAPSHOT_LOCATION_INTERNAL;
bool align_match = true;
bool external = def->state == VIR_DOMAIN_SNAPSHOT_DISK_SNAPSHOT ||
virDomainSnapshotDefIsExternal(def);
@@ -640,7 +640,7 @@ virDomainSnapshotDefAssignExternalNames(virDomainSnapshotDef *def)
*/
int
virDomainSnapshotAlignDisks(virDomainSnapshotDef *snapdef,
- int default_snapshot,
+ virDomainSnapshotLocation default_snapshot,
bool require_match)
{
virDomainDef *domdef = snapdef->parent.dom;
diff --git a/src/conf/snapshot_conf.h b/src/conf/snapshot_conf.h
index a3ec0cd410..e5d4d0fc45 100644
--- a/src/conf/snapshot_conf.h
+++ b/src/conf/snapshot_conf.h
@@ -126,7 +126,7 @@ char *virDomainSnapshotDefFormat(const char *uuidstr,
virDomainXMLOption *xmlopt,
unsigned int flags);
int virDomainSnapshotAlignDisks(virDomainSnapshotDef *snapshot,
- int default_snapshot,
+ virDomainSnapshotLocation default_snapshot,
bool require_match);
bool virDomainSnapshotDefIsExternal(virDomainSnapshotDef *def);
diff --git a/src/qemu/qemu_snapshot.c b/src/qemu/qemu_snapshot.c
index f92e00f9c0..51df0ed8df 100644
--- a/src/qemu/qemu_snapshot.c
+++ b/src/qemu/qemu_snapshot.c
@@ -1630,7 +1630,7 @@ qemuSnapshotCreateAlignDisks(virDomainObj *vm,
{
g_autofree char *xml = NULL;
qemuDomainObjPrivate *priv = vm->privateData;
- int align_location = VIR_DOMAIN_SNAPSHOT_LOCATION_INTERNAL;
+ virDomainSnapshotLocation align_location = VIR_DOMAIN_SNAPSHOT_LOCATION_INTERNAL;
bool align_match = true;
/* Easiest way to clone inactive portion of vm->def is via
diff --git a/src/test/test_driver.c b/src/test/test_driver.c
index 0e93b79922..2ff56cf03f 100644
--- a/src/test/test_driver.c
+++ b/src/test/test_driver.c
@@ -8717,7 +8717,7 @@ testDomainSnapshotAlignDisks(virDomainObj *vm,
virDomainSnapshotDef *def,
unsigned int flags)
{
- int align_location = VIR_DOMAIN_SNAPSHOT_LOCATION_INTERNAL;
+ virDomainSnapshotLocation align_location = VIR_DOMAIN_SNAPSHOT_LOCATION_INTERNAL;
bool align_match = true;
if (flags & VIR_DOMAIN_SNAPSHOT_CREATE_DISK_ONLY) {
--
2.31.1