]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemuDomainGetMemorySizeAlignment: Mark domain @def const
authorMichal Privoznik <mprivozn@redhat.com>
Mon, 24 Aug 2020 16:29:44 +0000 (18:29 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Mon, 24 Aug 2020 16:29:44 +0000 (18:29 +0200)
This function is not changing the domain definition, it's only
reading from it. The function is going to be used from another
function which already takes const virDomainDef. Make the @def
const to avoid typecasting it.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
src/qemu/qemu_domain.c

index b321722f0e694362714e719d22242336dc3ff06e..d708ef5f009e68f13f50fe97c453b4411912316d 100644 (file)
@@ -8025,7 +8025,7 @@ qemuDomainAgentAvailable(virDomainObjPtr vm,
 
 
 static unsigned long long
-qemuDomainGetMemorySizeAlignment(virDomainDefPtr def)
+qemuDomainGetMemorySizeAlignment(const virDomainDef *def)
 {
     /* PPC requires the memory sizes to be rounded to 256MiB increments, so
      * round them to the size always. */