[PATCH v1 06/31] virPCIDeviceAddressEqual: Fix const correctness

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

 



This function does not change any of the passed addresses. It
just reads them.

Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
---
 src/util/virpci.c | 4 ++--
 src/util/virpci.h | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/util/virpci.c b/src/util/virpci.c
index 75e8daadd5..5392d62406 100644
--- a/src/util/virpci.c
+++ b/src/util/virpci.c
@@ -1718,8 +1718,8 @@ virPCIDeviceAddressIsEmpty(const virPCIDeviceAddress *addr)
 }
 
 bool
-virPCIDeviceAddressEqual(virPCIDeviceAddress *addr1,
-                         virPCIDeviceAddress *addr2)
+virPCIDeviceAddressEqual(const virPCIDeviceAddress *addr1,
+                         const virPCIDeviceAddress *addr2)
 {
     if (addr1->domain == addr2->domain &&
         addr1->bus == addr2->bus &&
diff --git a/src/util/virpci.h b/src/util/virpci.h
index 457be3c929..a940608701 100644
--- a/src/util/virpci.h
+++ b/src/util/virpci.h
@@ -231,8 +231,8 @@ bool virPCIDeviceAddressIsValid(virPCIDeviceAddressPtr addr,
                                 bool report);
 bool virPCIDeviceAddressIsEmpty(const virPCIDeviceAddress *addr);
 
-bool virPCIDeviceAddressEqual(virPCIDeviceAddress *addr1,
-                              virPCIDeviceAddress *addr2);
+bool virPCIDeviceAddressEqual(const virPCIDeviceAddress *addr1,
+                              const virPCIDeviceAddress *addr2);
 
 char *virPCIDeviceAddressAsString(virPCIDeviceAddressPtr addr)
       ATTRIBUTE_NONNULL(1);
-- 
2.21.0

--
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