Keep const correctness and allow to use this function in cases where @def is const in the caller. --- src/conf/domain_conf.c | 2 +- src/conf/domain_conf.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 217179d..002bf13 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -7772,7 +7772,7 @@ virDomainDefHasMemoryHotplug(const virDomainDef *def) * or the sum of memory sizes of NUMA nodes in case NUMA is enabled in @def. */ unsigned long long -virDomainDefGetMemoryInitial(virDomainDefPtr def) +virDomainDefGetMemoryInitial(const virDomainDef *def) { return def->mem.initial_memory; } diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index fd4ef82..f10b534 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -2325,7 +2325,7 @@ struct _virDomainDef { xmlNodePtr metadata; }; -unsigned long long virDomainDefGetMemoryInitial(virDomainDefPtr def); +unsigned long long virDomainDefGetMemoryInitial(const virDomainDef *def); void virDomainDefSetMemoryTotal(virDomainDefPtr def, unsigned long long size); void virDomainDefSetMemoryInitial(virDomainDefPtr def, unsigned long long size); unsigned long long virDomainDefGetMemoryActual(virDomainDefPtr def); -- 2.4.5 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list