(hostent_find_fqdn): const-ize

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@10307 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Assar Westerlund
2001-07-10 11:58:23 +00:00
parent 45a8526fea
commit 01de7b57ce

View File

@@ -42,14 +42,14 @@ RCSID("$Id$");
* Try to find a fqdn (with `.') in he if possible, else return h_name
*/
char *
const char *
hostent_find_fqdn (const struct hostent *he)
{
char *ret = he->h_name;
char **h;
const char *ret = he->h_name;
const char **h;
if (strchr (ret, '.') == NULL)
for (h = he->h_aliases; *h; ++h) {
for (h = (const char **)he->h_aliases; *h != NULL; ++h) {
if (strchr (*h, '.') != NULL) {
ret = *h;
break;