Mercurial > gnulib
changeset 20240:92c19a601edd
(canon_host): Cast returned he->h_name to char*.
author | Jim Meyering <jim@meyering.net> |
---|---|
date | Sun, 04 Feb 1996 13:22:22 +0000 |
parents | 6dbcec346df8 |
children | 70b90949b797 |
files | lib/canon-host.c |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/lib/canon-host.c Sun Feb 04 12:47:33 1996 +0000 +++ b/lib/canon-host.c Sun Feb 04 13:22:22 1996 +0000 @@ -58,7 +58,7 @@ { #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 @@ /* 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 */