Minor fixes from changeset a5f54865d41c3f181a06 from Heimdal project http://github.com/heimdal/heimdal

This commit is contained in:
Joachim Nilsson 2010-07-23 09:46:49 +02:00
parent cc1fd1e9dc
commit b51dad6408
2 changed files with 7 additions and 7 deletions

View File

@ -186,10 +186,9 @@ char *default_rl_complete(char *pathname, int *unique)
j = strlen(av[0]) - len + 2;
if ((p = NEW(char, j + 1)) != NULL) {
COPYFROMTO(p, av[0] + len, j);
if ((new = NEW(char, strlen(dir) + strlen(av[0]) + 2)) != NULL) {
(void)strcpy(new, dir);
(void)strcat(new, "/");
(void)strcat(new, av[0]);
len = strlen(dir) + strlen(av[0]) + 2;
if ((new = NEW(char, len)) != NULL) {
snprintf(new, len, "%s/%s", dir, av[0]);
rl_add_slash(new, p);
DISPOSE(new);
}

View File

@ -194,8 +194,9 @@ static int tty_get(void)
return *Input++;
do
{
r= read(0, &c, (SIZE_T)1);
r = read(0, &c, 1);
} while (r == -1 && errno == EINTR);
return r == 1 ? c : EOF;
}