From: Michal Privoznik Date: Thu, 6 Jun 2019 15:02:11 +0000 (+0200) Subject: virPCIDeviceAddressAsString: Fix const correctness X-Git-Tag: v5.7.0-rc1~380 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ac77ed27fe498d85d3640b8ec5f1f1977f301f4a;p=thirdparty%2Flibvirt.git virPCIDeviceAddressAsString: Fix const correctness This function does not change any of the passed addresses. It just reads them. Signed-off-by: Michal Privoznik ACKed-by: Peter Krempa --- diff --git a/src/util/virpci.c b/src/util/virpci.c index 3b5071824f..61a6b359e5 100644 --- a/src/util/virpci.c +++ b/src/util/virpci.c @@ -1744,7 +1744,7 @@ virPCIDeviceAddressEqual(const virPCIDeviceAddress *addr1, } char * -virPCIDeviceAddressAsString(virPCIDeviceAddressPtr addr) +virPCIDeviceAddressAsString(const virPCIDeviceAddress *addr) { char *str; diff --git a/src/util/virpci.h b/src/util/virpci.h index 4b00749151..5074851777 100644 --- a/src/util/virpci.h +++ b/src/util/virpci.h @@ -236,7 +236,7 @@ bool virPCIDeviceAddressIsEmpty(const virPCIDeviceAddress *addr); bool virPCIDeviceAddressEqual(const virPCIDeviceAddress *addr1, const virPCIDeviceAddress *addr2); -char *virPCIDeviceAddressAsString(virPCIDeviceAddressPtr addr) +char *virPCIDeviceAddressAsString(const virPCIDeviceAddress *addr) ATTRIBUTE_NONNULL(1); int virPCIDeviceAddressParse(char *address, virPCIDeviceAddressPtr bdf);