summaryrefslogtreecommitdiff
path: root/lib/canon-host.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1996-02-04 13:22:22 +0000
committerJim Meyering <jim@meyering.net>1996-02-04 13:22:22 +0000
commit73c74c03031415964cbe09b6d0364b604440dca2 (patch)
treeb9217e77f293e4bdb1ac64146e406c7685d1cad5 /lib/canon-host.c
parent2d882a72007b918bd51076d72424fb9cd3b78c59 (diff)
downloadcoreutils-73c74c03031415964cbe09b6d0364b604440dca2.tar.xz
(canon_host): Cast returned he->h_name to char*.
Diffstat (limited to 'lib/canon-host.c')
-rw-r--r--lib/canon-host.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/canon-host.c b/lib/canon-host.c
index 180c86a07..83b2cb9ad 100644
--- a/lib/canon-host.c
+++ b/lib/canon-host.c
@@ -58,7 +58,7 @@ canon_host (host)
{
#ifdef HAVE_INET_NTOA
case AF_INET:
- addr = inet_ntoa (*(struct in_addr *)he->h_addr);
+ addr = inet_ntoa (*(struct in_addr *) he->h_addr);
break;
#endif /* HAVE_INET_NTOA */
}
@@ -67,10 +67,10 @@ canon_host (host)
/* gethostbyname() cheated! Lookup the host name via the address
this time to get the actual host name. */
he = gethostbyaddr (he->h_addr, he->h_length, he->h_addrtype);
-#endif HAVE_GETHOSTBYADDR
+#endif /* HAVE_GETHOSTBYADDR */
if (he)
- return he->h_name;
+ return (char *) (he->h_name);
}
#else /* ! HAVE_GETHOSTBYNAME */