remove another strcpy

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14939 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2005-04-24 20:59:35 +00:00
parent 75a77c6e79
commit 5ff49eff33
4 changed files with 9 additions and 10 deletions

View File

@@ -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 */