summaryrefslogtreecommitdiff
path: root/gethost.c
diff options
context:
space:
mode:
authorDr. Tilmann Bubeck <t.bubeck@reinform.de>2013-09-25 09:36:58 +0200
committerDr. Tilmann Bubeck <t.bubeck@reinform.de>2013-09-25 09:36:58 +0200
commitfb328950ce1156b8228214240b213860b794b4c8 (patch)
tree3515c4b5bd83be85d8e6ae932569d5da8732b19f /gethost.c
parent345c7bf0d09f26183cfde9ad1c812c8de71869a5 (diff)
downloadxorg-app-xauth-fb328950ce1156b8228214240b213860b794b4c8.tar.gz
More fixes for compiler warnings regarding the use of "const".
Diffstat (limited to 'gethost.c')
-rw-r--r--gethost.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gethost.c b/gethost.c
index 8f282c7..f69ba1d 100644
--- a/gethost.c
+++ b/gethost.c
@@ -231,7 +231,7 @@ struct addrlist *get_address_info (
if (ai->ai_family == AF_INET) {
struct sockaddr_in *sin = (struct sockaddr_in *)ai->ai_addr;
src = &(sin->sin_addr);
- if (*(in_addr_t *) src == htonl(INADDR_LOOPBACK)) {
+ if (*(const in_addr_t *) src == htonl(INADDR_LOOPBACK)) {
family = FamilyLocal;
if (get_local_hostname (buf, sizeof buf)) {
src = buf;
@@ -245,8 +245,8 @@ struct addrlist *get_address_info (
} else if (ai->ai_family == AF_INET6) {
struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)ai->ai_addr;
src = &(sin6->sin6_addr);
- if (IN6_IS_ADDR_V4MAPPED((struct sockaddr_in6 *)src)
- || IN6_IS_ADDR_LOOPBACK((struct sockaddr_in6 *)src)) {
+ if (IN6_IS_ADDR_V4MAPPED((const struct sockaddr_in6 *)src)
+ || IN6_IS_ADDR_LOOPBACK((const struct sockaddr_in6 *)src)) {
family = FamilyLocal;
if (get_local_hostname (buf, sizeof buf)) {
src = buf;
@@ -295,7 +295,7 @@ struct addrlist *get_address_info (
#else
if (!get_inet_address (host, &hostinetaddr)) return NULL;
src = (char *) &hostinetaddr;
- if (*(in_addr_t *) src == htonl(INADDR_LOOPBACK)) {
+ if (*(const in_addr_t *) src == htonl(INADDR_LOOPBACK)) {
family = FamilyLocal;
if (get_local_hostname (buf, sizeof buf)) {
src = buf;