The disk is not changed anywhere in the function. Mark this fact in the function header too. Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx> --- 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 d5207b1..3b26ba3 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -1466,7 +1466,7 @@ virDomainDiskSetType(virDomainDiskDefPtr def, int type) const char * -virDomainDiskGetSource(virDomainDiskDefPtr def) +virDomainDiskGetSource(virDomainDiskDef const *def) { return def->src->path; } diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index 0fcf52e..c20385f 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -2437,7 +2437,7 @@ void virDomainDiskDefFree(virDomainDiskDefPtr def); void virDomainLeaseDefFree(virDomainLeaseDefPtr def); int virDomainDiskGetType(virDomainDiskDefPtr def); void virDomainDiskSetType(virDomainDiskDefPtr def, int type); -const char *virDomainDiskGetSource(virDomainDiskDefPtr def); +const char *virDomainDiskGetSource(virDomainDiskDef const *def); int virDomainDiskSetSource(virDomainDiskDefPtr def, const char *src) ATTRIBUTE_RETURN_CHECK; const char *virDomainDiskGetDriver(virDomainDiskDefPtr def); -- 2.3.6 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list