(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:
@@ -42,14 +42,14 @@ RCSID("$Id$");
|
|||||||
* Try to find a fqdn (with `.') in he if possible, else return h_name
|
* Try to find a fqdn (with `.') in he if possible, else return h_name
|
||||||
*/
|
*/
|
||||||
|
|
||||||
char *
|
const char *
|
||||||
hostent_find_fqdn (const struct hostent *he)
|
hostent_find_fqdn (const struct hostent *he)
|
||||||
{
|
{
|
||||||
char *ret = he->h_name;
|
const char *ret = he->h_name;
|
||||||
char **h;
|
const char **h;
|
||||||
|
|
||||||
if (strchr (ret, '.') == NULL)
|
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) {
|
if (strchr (*h, '.') != NULL) {
|
||||||
ret = *h;
|
ret = *h;
|
||||||
break;
|
break;
|
||||||
|
Reference in New Issue
Block a user