diff --git a/src/network.c b/src/network.c index 9caef04..a0c4396 100644 --- a/src/network.c +++ b/src/network.c @@ -249,7 +249,7 @@ CLEANUP: * Convert the network address into either a dotted-decimal or an IPv6 * hex string. */ -char *get_ip_string (struct sockaddr *sa, char *buf, size_t buflen) +const char *get_ip_string (struct sockaddr *sa, char *buf, size_t buflen) { assert (sa != NULL); assert (buf != NULL); diff --git a/src/network.h b/src/network.h index b6ddaa6..15af481 100644 --- a/src/network.h +++ b/src/network.h @@ -27,7 +27,7 @@ extern ssize_t safe_read (int fd, char *buffer, size_t count); extern int write_message (int fd, const char *fmt, ...); extern ssize_t readline (int fd, char **whole_buffer); -extern char *get_ip_string (struct sockaddr *sa, char *buf, size_t len); +extern const char *get_ip_string (struct sockaddr *sa, char *buf, size_t len); extern int full_inet_pton (const char *ip, void *dst); #endif