[PATCH v2 2/7] util: Fix const'ness of 1st arg to virPCIGetNetName()

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

 



The first arg isn't modified in the function, so it should be const.
---
New for V2.

 src/util/virpci.c | 4 ++--
 src/util/virpci.h | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/util/virpci.c b/src/util/virpci.c
index 2c1b75855..110d9741c 100644
--- a/src/util/virpci.c
+++ b/src/util/virpci.c
@@ -2857,7 +2857,7 @@ virPCIDeviceAddressGetSysfsFile(virPCIDeviceAddressPtr addr,
  * Returns the network device name of a pci device
  */
 int
-virPCIGetNetName(char *device_link_sysfs_path, char **netname)
+virPCIGetNetName(const char *device_link_sysfs_path, char **netname)
 {
     char *pcidev_sysfs_net_path = NULL;
     int ret = -1;
@@ -2991,7 +2991,7 @@ virPCIDeviceAddressGetSysfsFile(virPCIDeviceAddressPtr dev ATTRIBUTE_UNUSED,
 }
 
 int
-virPCIGetNetName(char *device_link_sysfs_path ATTRIBUTE_UNUSED,
+virPCIGetNetName(const char *device_link_sysfs_path ATTRIBUTE_UNUSED,
                  char **netname ATTRIBUTE_UNUSED)
 {
     virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _(unsupported));
diff --git a/src/util/virpci.h b/src/util/virpci.h
index 570684e75..82d4ddc61 100644
--- a/src/util/virpci.h
+++ b/src/util/virpci.h
@@ -207,7 +207,7 @@ int virPCIGetVirtualFunctionIndex(const char *pf_sysfs_device_link,
 int virPCIDeviceAddressGetSysfsFile(virPCIDeviceAddressPtr addr,
                                     char **pci_sysfs_device_link);
 
-int virPCIGetNetName(char *device_link_sysfs_path, char **netname);
+int virPCIGetNetName(const char *device_link_sysfs_path, char **netname);
 
 int virPCIGetSysfsFile(char *virPCIDeviceName,
                              char **pci_sysfs_device_link)
-- 
2.13.3

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