From: Ezra Peisach Date: Thu, 3 May 2001 18:44:24 +0000 (+0000) Subject: * sane_hostname.c (pty_make_sane_hostname): Preserve const X-Git-Tag: krb5-1.3-alpha1~1523 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=cb95276178c0977cab6c1bc5351551ccae01fc84;p=krb5.git * sane_hostname.c (pty_make_sane_hostname): Preserve const property of incomming parameter in casts. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13228 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/util/pty/ChangeLog b/src/util/pty/ChangeLog index a3794f784..51e5188cf 100644 --- a/src/util/pty/ChangeLog +++ b/src/util/pty/ChangeLog @@ -1,3 +1,8 @@ +2001-05-03 Ezra Peisach + + * sane_hostname.c (pty_make_sane_hostname): Preserve const + property of incomming parameter in casts. + 2001-05-03 Ezra Peisach * cleanup.c (pty_cleanup): Delcare local variable only if diff --git a/src/util/pty/sane_hostname.c b/src/util/pty/sane_hostname.c index 5edd443ca..de2a4d356 100644 --- a/src/util/pty/sane_hostname.c +++ b/src/util/pty/sane_hostname.c @@ -144,7 +144,7 @@ pty_make_sane_hostname(const struct sockaddr *addr, int maxlen, (*out)[ut_host_len - 1] = '\0'; #else /* old gethostbyaddr interface; how quaint :-) */ if (addr->sa_family == AF_INET) - hp = gethostbyaddr((char *)&((struct sockaddr_in *)addr)->sin_addr, + hp = gethostbyaddr((const char *)&((const struct sockaddr_in *)addr)->sin_addr, sizeof (struct in_addr), addr->sa_family); else hp = NULL;