From: Ezra Peisach Date: Tue, 19 Mar 1996 02:08:17 +0000 (+0000) Subject: Back out last change and use a cast to avoid warnings. X-Git-Tag: krb5-1.0-beta6~343 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=abdc2ca88fd7c8f0ae2efb30ae6a6206ff989664;p=krb5.git Back out last change and use a cast to avoid warnings. Richard has indicated that come compilers get upset if you try to reassign a const char *. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@7659 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/krb5/os/ChangeLog b/src/lib/krb5/os/ChangeLog index bd762c5e5..edbf316a4 100644 --- a/src/lib/krb5/os/ChangeLog +++ b/src/lib/krb5/os/ChangeLog @@ -1,7 +1,6 @@ Mon Mar 18 17:30:54 1996 Ezra Peisach - * sn2princ.c (krb5_sname_to_principal): Do not assign a const char * - to a non-const char *. + * sn2princ.c (krb5_sname_to_principal): Add casting to avoid warnings. Mon Mar 18 14:18:58 EST 1996 Richard Basch diff --git a/src/lib/krb5/os/sn2princ.c b/src/lib/krb5/os/sn2princ.c index e9622049a..cfa95a4c3 100644 --- a/src/lib/krb5/os/sn2princ.c +++ b/src/lib/krb5/os/sn2princ.c @@ -45,8 +45,11 @@ krb5_sname_to_principal(context, hostname, sname, type, ret_princ) krb5_error_code retval; register char *cp; char localname[MAXHOSTNAMELEN]; - const char *host = hostname; - const char *service = sname; + /* We cast this instead of declaring as const char* due to some compilers + * which apparently get upset at reassigning the variable + */ + char *host = (char *) hostname; + char *service = (char *) sname; if ((type == KRB5_NT_UNKNOWN) || (type == KRB5_NT_SRV_HST)) {