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
Mon Mar 18 17:30:54 1996 Ezra Peisach <epeisach@kangaroo.mit.edu>
- * 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 <basch@lehman.com>
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)) {