[PATCH v1 01/14] conf: Fix virDomainDeviceGetInfo const correctness

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This function is not changing passed domain definition.
Therefore, mark the argument as 'const'.

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 25d48f977..31684df54 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -3501,7 +3501,7 @@ int virDomainDeviceAddressIsValid(virDomainDeviceInfoPtr info,
 }
 
 virDomainDeviceInfoPtr
-virDomainDeviceGetInfo(virDomainDeviceDefPtr device)
+virDomainDeviceGetInfo(const virDomainDeviceDef *device)
 {
     switch ((virDomainDeviceType) device->type) {
     case VIR_DOMAIN_DEVICE_DISK:
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
index a42efcfa6..1e007346f 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -2756,7 +2756,7 @@ virDomainDeviceDefPtr virDomainDeviceDefCopy(virDomainDeviceDefPtr src,
                                              virDomainXMLOptionPtr xmlopt);
 int virDomainDeviceAddressIsValid(virDomainDeviceInfoPtr info,
                                   int type);
-virDomainDeviceInfoPtr virDomainDeviceGetInfo(virDomainDeviceDefPtr device);
+virDomainDeviceInfoPtr virDomainDeviceGetInfo(const virDomainDeviceDef *device);
 void virDomainTPMDefFree(virDomainTPMDefPtr def);
 
 typedef int (*virDomainDeviceInfoCallback)(virDomainDefPtr def,
-- 
2.13.6

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux