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:
@@ -527,7 +527,7 @@ auth_reply(unsigned char *data, int cnt)
|
|||||||
void
|
void
|
||||||
auth_name(unsigned char *data, int cnt)
|
auth_name(unsigned char *data, int cnt)
|
||||||
{
|
{
|
||||||
unsigned char savename[256];
|
char savename[256];
|
||||||
|
|
||||||
if (cnt < 1) {
|
if (cnt < 1) {
|
||||||
if (auth_debug_mode)
|
if (auth_debug_mode)
|
||||||
|
@@ -209,7 +209,8 @@ kerberos5_send(char *name, Authenticator *ap)
|
|||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!auth_sendname(UserNameRequested, strlen(UserNameRequested))) {
|
if (!auth_sendname((unsigned char *)UserNameRequested,
|
||||||
|
strlen(UserNameRequested))) {
|
||||||
if (auth_debug_mode)
|
if (auth_debug_mode)
|
||||||
printf("Not enough room for user name\r\n");
|
printf("Not enough room for user name\r\n");
|
||||||
return(0);
|
return(0);
|
||||||
|
@@ -1560,7 +1560,7 @@ env_init(void)
|
|||||||
|
|
||||||
/* If this is not the full name, try to get it via DNS */
|
/* If this is not the full name, try to get it via DNS */
|
||||||
if (strchr(hbuf, '.') == 0) {
|
if (strchr(hbuf, '.') == 0) {
|
||||||
struct hostent *he = gethostbyname(hbuf);
|
struct hostent *he = roken_gethostbyname(hbuf);
|
||||||
if (he != 0)
|
if (he != 0)
|
||||||
strncpy(hbuf, he->h_name, 256);
|
strncpy(hbuf, he->h_name, 256);
|
||||||
hbuf[256] = '\0';
|
hbuf[256] = '\0';
|
||||||
@@ -1602,7 +1602,7 @@ env_define(unsigned char *var, unsigned char *value)
|
|||||||
if (ep->next)
|
if (ep->next)
|
||||||
ep->next->prev = ep;
|
ep->next->prev = ep;
|
||||||
}
|
}
|
||||||
ep->welldefined = opt_welldefined(var);
|
ep->welldefined = opt_welldefined((char *)var);
|
||||||
ep->export = 1;
|
ep->export = 1;
|
||||||
ep->var = (unsigned char *)strdup((char *)var);
|
ep->var = (unsigned char *)strdup((char *)var);
|
||||||
ep->value = (unsigned char *)strdup((char *)value);
|
ep->value = (unsigned char *)strdup((char *)value);
|
||||||
@@ -2140,7 +2140,7 @@ tn(int argc, char **argv)
|
|||||||
if(host == NULL)
|
if(host == NULL)
|
||||||
host = gethostbyname2(hostp, AF_INET);
|
host = gethostbyname2(hostp, AF_INET);
|
||||||
#else
|
#else
|
||||||
host = gethostbyname(hostp);
|
host = roken_gethostbyname(hostp);
|
||||||
#endif
|
#endif
|
||||||
if (host) {
|
if (host) {
|
||||||
strncpy(_hostname, host->h_name, sizeof(_hostname));
|
strncpy(_hostname, host->h_name, sizeof(_hostname));
|
||||||
@@ -2192,7 +2192,7 @@ tn(int argc, char **argv)
|
|||||||
telnetport = 0;
|
telnetport = 0;
|
||||||
port = atoi(portp);
|
port = atoi(portp);
|
||||||
if (port == 0) {
|
if (port == 0) {
|
||||||
sp = getservbyname(portp, "tcp");
|
sp = roken_getservbyname(portp, "tcp");
|
||||||
if (sp)
|
if (sp)
|
||||||
port = sp->s_port;
|
port = sp->s_port;
|
||||||
else {
|
else {
|
||||||
@@ -2205,7 +2205,7 @@ tn(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (sp == 0) {
|
if (sp == 0) {
|
||||||
sp = getservbyname("telnet", "tcp");
|
sp = roken_getservbyname("telnet", "tcp");
|
||||||
if (sp == 0) {
|
if (sp == 0) {
|
||||||
fprintf(stderr, "telnet: tcp/telnet: unknown service\r\n");
|
fprintf(stderr, "telnet: tcp/telnet: unknown service\r\n");
|
||||||
setuid(getuid());
|
setuid(getuid());
|
||||||
@@ -2649,7 +2649,7 @@ sourceroute(char *arg, char **cpp, int *lenp)
|
|||||||
|
|
||||||
if ((tmp = inet_addr(cp)) != -1) {
|
if ((tmp = inet_addr(cp)) != -1) {
|
||||||
sin_addr.s_addr = tmp;
|
sin_addr.s_addr = tmp;
|
||||||
} else if ((host = gethostbyname(cp))) {
|
} else if ((host = roken_gethostbyname(cp))) {
|
||||||
#if defined(h_addr)
|
#if defined(h_addr)
|
||||||
memmove(&sin_addr,
|
memmove(&sin_addr,
|
||||||
host->h_addr_list[0],
|
host->h_addr_list[0],
|
||||||
|
@@ -131,7 +131,7 @@ main(int argc, char **argv)
|
|||||||
/* sometimes we don't want a mangled display */
|
/* sometimes we don't want a mangled display */
|
||||||
char *p;
|
char *p;
|
||||||
if((p = getenv("DISPLAY")))
|
if((p = getenv("DISPLAY")))
|
||||||
env_define("DISPLAY", p);
|
env_define("DISPLAY", (unsigned char*)p);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'E':
|
case 'E':
|
||||||
|
@@ -1471,7 +1471,7 @@ env_opt_add(unsigned char *ep)
|
|||||||
opt_replyp = opt_reply + len - (opt_replyend - opt_replyp);
|
opt_replyp = opt_reply + len - (opt_replyend - opt_replyp);
|
||||||
opt_replyend = opt_reply + len;
|
opt_replyend = opt_reply + len;
|
||||||
}
|
}
|
||||||
if (opt_welldefined(ep))
|
if (opt_welldefined((char *)ep))
|
||||||
#ifdef OLD_ENVIRON
|
#ifdef OLD_ENVIRON
|
||||||
if (telopt_environ == TELOPT_OLD_ENVIRON)
|
if (telopt_environ == TELOPT_OLD_ENVIRON)
|
||||||
*opt_replyp++ = old_env_var;
|
*opt_replyp++ = old_env_var;
|
||||||
|
@@ -110,7 +110,7 @@ ttyflush(int drop)
|
|||||||
TerminalFlushOutput();
|
TerminalFlushOutput();
|
||||||
/* we leave 'n' alone! */
|
/* we leave 'n' alone! */
|
||||||
} else {
|
} else {
|
||||||
n = TerminalWrite(ttyoring.consume, n);
|
n = TerminalWrite((char *)ttyoring.consume, n);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (n > 0) {
|
if (n > 0) {
|
||||||
@@ -125,7 +125,7 @@ ttyflush(int drop)
|
|||||||
if (n1 == n && n0 > n) {
|
if (n1 == n && n0 > n) {
|
||||||
n1 = n0 - n;
|
n1 = n0 - n;
|
||||||
if (!drop)
|
if (!drop)
|
||||||
n1 = TerminalWrite(ttyoring.bottom, n1);
|
n1 = TerminalWrite((char *)ttyoring.bottom, n1);
|
||||||
if (n1 > 0)
|
if (n1 > 0)
|
||||||
n += n1;
|
n += n1;
|
||||||
}
|
}
|
||||||
|
@@ -253,7 +253,7 @@ void
|
|||||||
printsub(char direction, unsigned char *pointer, int length)
|
printsub(char direction, unsigned char *pointer, int length)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
char buf[512];
|
unsigned char buf[512];
|
||||||
extern int want_status_response;
|
extern int want_status_response;
|
||||||
|
|
||||||
if (showoptions || direction == 0 ||
|
if (showoptions || direction == 0 ||
|
||||||
|
@@ -528,7 +528,7 @@ printsub(int direction, unsigned char *pointer, int length)
|
|||||||
/* length of suboption data */
|
/* length of suboption data */
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
char buf[512];
|
unsigned char buf[512];
|
||||||
|
|
||||||
if (!(diagnostic & TD_OPTIONS))
|
if (!(diagnostic & TD_OPTIONS))
|
||||||
return;
|
return;
|
||||||
|
Reference in New Issue
Block a user