[libvirt PATCH v2 02/22] conf: Make virDomainDeviceInfoFormat() const correct

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

 



Signed-off-by: Andrea Bolognani <abologna@xxxxxxxxxx>
---
 src/conf/domain_addr.c | 4 ++--
 src/conf/domain_addr.h | 4 ++--
 src/conf/domain_conf.c | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/conf/domain_addr.c b/src/conf/domain_addr.c
index 53b39923e8..fe6520cf3a 100644
--- a/src/conf/domain_addr.c
+++ b/src/conf/domain_addr.c
@@ -1829,7 +1829,7 @@ virDomainVirtioSerialAddrIsComplete(virDomainDeviceInfo *info)
 
 
 bool
-virDomainUSBAddressPortIsValid(unsigned int *port)
+virDomainUSBAddressPortIsValid(const unsigned int *port)
 {
     return port[0] != 0;
 }
@@ -1837,7 +1837,7 @@ virDomainUSBAddressPortIsValid(unsigned int *port)
 
 void
 virDomainUSBAddressPortFormatBuf(virBuffer *buf,
-                                 unsigned int *port)
+                                 const unsigned int *port)
 {
     size_t i;
 
diff --git a/src/conf/domain_addr.h b/src/conf/domain_addr.h
index 3f8fcf8acb..814b556024 100644
--- a/src/conf/domain_addr.h
+++ b/src/conf/domain_addr.h
@@ -246,12 +246,12 @@ virDomainVirtioSerialAddrAutoAssign(virDomainDef *def,
     ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
 
 bool
-virDomainUSBAddressPortIsValid(unsigned int *port)
+virDomainUSBAddressPortIsValid(const unsigned int *port)
     ATTRIBUTE_NONNULL(1);
 
 void
 virDomainUSBAddressPortFormatBuf(virBuffer *buf,
-                                 unsigned int *port)
+                                 const unsigned int *port)
     ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
 
 #define VIR_DOMAIN_USB_HUB_PORTS 8
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 6fcf86ba58..a3f0a27058 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -6334,7 +6334,7 @@ virDomainVirtioOptionsFormat(virBuffer *buf,
 
 static void ATTRIBUTE_NONNULL(2)
 virDomainDeviceInfoFormat(virBuffer *buf,
-                          virDomainDeviceInfo *info,
+                          const virDomainDeviceInfo *info,
                           unsigned int flags)
 {
     g_auto(virBuffer) attrBuf = VIR_BUFFER_INITIALIZER;
-- 
2.31.1




[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