const and char-cleanup

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@3694 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Assar Westerlund
1997-10-29 01:27:11 +00:00
parent f5fc784fff
commit 770632d951
8 changed files with 15 additions and 14 deletions

View File

@@ -527,7 +527,7 @@ auth_reply(unsigned char *data, int cnt)
void
auth_name(unsigned char *data, int cnt)
{
unsigned char savename[256];
char savename[256];
if (cnt < 1) {
if (auth_debug_mode)

View File

@@ -209,7 +209,8 @@ kerberos5_send(char *name, Authenticator *ap)
return(0);
}
if (!auth_sendname(UserNameRequested, strlen(UserNameRequested))) {
if (!auth_sendname((unsigned char *)UserNameRequested,
strlen(UserNameRequested))) {
if (auth_debug_mode)
printf("Not enough room for user name\r\n");
return(0);

View File

@@ -1560,7 +1560,7 @@ env_init(void)
/* If this is not the full name, try to get it via DNS */
if (strchr(hbuf, '.') == 0) {
struct hostent *he = gethostbyname(hbuf);
struct hostent *he = roken_gethostbyname(hbuf);
if (he != 0)
strncpy(hbuf, he->h_name, 256);
hbuf[256] = '\0';
@@ -1602,7 +1602,7 @@ env_define(unsigned char *var, unsigned char *value)
if (ep->next)
ep->next->prev = ep;
}
ep->welldefined = opt_welldefined(var);
ep->welldefined = opt_welldefined((char *)var);
ep->export = 1;
ep->var = (unsigned char *)strdup((char *)var);
ep->value = (unsigned char *)strdup((char *)value);
@@ -2140,7 +2140,7 @@ tn(int argc, char **argv)
if(host == NULL)
host = gethostbyname2(hostp, AF_INET);
#else
host = gethostbyname(hostp);
host = roken_gethostbyname(hostp);
#endif
if (host) {
strncpy(_hostname, host->h_name, sizeof(_hostname));
@@ -2192,7 +2192,7 @@ tn(int argc, char **argv)
telnetport = 0;
port = atoi(portp);
if (port == 0) {
sp = getservbyname(portp, "tcp");
sp = roken_getservbyname(portp, "tcp");
if (sp)
port = sp->s_port;
else {
@@ -2205,7 +2205,7 @@ tn(int argc, char **argv)
}
} else {
if (sp == 0) {
sp = getservbyname("telnet", "tcp");
sp = roken_getservbyname("telnet", "tcp");
if (sp == 0) {
fprintf(stderr, "telnet: tcp/telnet: unknown service\r\n");
setuid(getuid());
@@ -2649,7 +2649,7 @@ sourceroute(char *arg, char **cpp, int *lenp)
if ((tmp = inet_addr(cp)) != -1) {
sin_addr.s_addr = tmp;
} else if ((host = gethostbyname(cp))) {
} else if ((host = roken_gethostbyname(cp))) {
#if defined(h_addr)
memmove(&sin_addr,
host->h_addr_list[0],

View File

@@ -131,7 +131,7 @@ main(int argc, char **argv)
/* sometimes we don't want a mangled display */
char *p;
if((p = getenv("DISPLAY")))
env_define("DISPLAY", p);
env_define("DISPLAY", (unsigned char*)p);
break;
}
case 'E':

View File

@@ -1471,7 +1471,7 @@ env_opt_add(unsigned char *ep)
opt_replyp = opt_reply + len - (opt_replyend - opt_replyp);
opt_replyend = opt_reply + len;
}
if (opt_welldefined(ep))
if (opt_welldefined((char *)ep))
#ifdef OLD_ENVIRON
if (telopt_environ == TELOPT_OLD_ENVIRON)
*opt_replyp++ = old_env_var;

View File

@@ -110,7 +110,7 @@ ttyflush(int drop)
TerminalFlushOutput();
/* we leave 'n' alone! */
} else {
n = TerminalWrite(ttyoring.consume, n);
n = TerminalWrite((char *)ttyoring.consume, n);
}
}
if (n > 0) {
@@ -125,7 +125,7 @@ ttyflush(int drop)
if (n1 == n && n0 > n) {
n1 = n0 - n;
if (!drop)
n1 = TerminalWrite(ttyoring.bottom, n1);
n1 = TerminalWrite((char *)ttyoring.bottom, n1);
if (n1 > 0)
n += n1;
}

View File

@@ -253,7 +253,7 @@ void
printsub(char direction, unsigned char *pointer, int length)
{
int i;
char buf[512];
unsigned char buf[512];
extern int want_status_response;
if (showoptions || direction == 0 ||

View File

@@ -528,7 +528,7 @@ printsub(int direction, unsigned char *pointer, int length)
/* length of suboption data */
{
int i;
char buf[512];
unsigned char buf[512];
if (!(diagnostic & TD_OPTIONS))
return;