CLEANUP: standard: use proper const to addr_to_str() and port_to_str()
The input parameter was not marked const, making it painful for some calls.
diff --git a/src/standard.c b/src/standard.c
index 1035e20..a81f5a0 100644
--- a/src/standard.c
+++ b/src/standard.c
@@ -1427,10 +1427,10 @@
* is returned upon error, with errno set. AF_INET, AF_INET6 and AF_UNIX are
* supported.
*/
-int addr_to_str(struct sockaddr_storage *addr, char *str, int size)
+int addr_to_str(const struct sockaddr_storage *addr, char *str, int size)
{
- void *ptr;
+ const void *ptr;
if (size < 5)
return 0;
@@ -1463,7 +1463,7 @@
* is returned upon error, with errno set. AF_INET, AF_INET6 and AF_UNIX are
* supported.
*/
-int port_to_str(struct sockaddr_storage *addr, char *str, int size)
+int port_to_str(const struct sockaddr_storage *addr, char *str, int size)
{
uint16_t port;