remove another strcpy
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14939 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -939,7 +939,7 @@ suboption(void)
|
||||
} /* end of case TELOPT_TSPEED */
|
||||
|
||||
case TELOPT_TTYPE: { /* Yaaaay! */
|
||||
static char terminalname[41];
|
||||
char *p;
|
||||
|
||||
if (his_state_is_wont(TELOPT_TTYPE)) /* Ignore if option disabled */
|
||||
break;
|
||||
@@ -949,9 +949,9 @@ suboption(void)
|
||||
return; /* ??? XXX but, this is the most robust */
|
||||
}
|
||||
|
||||
terminaltype = terminalname;
|
||||
p = terminaltype;
|
||||
|
||||
while ((terminaltype < (terminalname + sizeof terminalname-1)) &&
|
||||
while ((p < (terminaltype + sizeof terminaltype-1)) &&
|
||||
!SB_EOF()) {
|
||||
int c;
|
||||
|
||||
@@ -959,10 +959,9 @@ suboption(void)
|
||||
if (isupper(c)) {
|
||||
c = tolower(c);
|
||||
}
|
||||
*terminaltype++ = c; /* accumulate name */
|
||||
*p++ = c; /* accumulate name */
|
||||
}
|
||||
*terminaltype = 0;
|
||||
terminaltype = terminalname;
|
||||
*p = 0;
|
||||
break;
|
||||
} /* end of case TELOPT_TTYPE */
|
||||
|
||||
|
Reference in New Issue
Block a user