diff options
Diffstat (limited to 'sftp.c')
-rw-r--r-- | sftp.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: sftp.c,v 1.170 2015/01/20 23:14:00 deraadt Exp $ */ | 1 | /* $OpenBSD: sftp.c,v 1.171 2015/08/20 22:32:42 deraadt Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org> | 3 | * Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org> |
4 | * | 4 | * |
@@ -1958,7 +1958,7 @@ complete(EditLine *el, int ch) | |||
1958 | 1958 | ||
1959 | /* Figure out which argument the cursor points to */ | 1959 | /* Figure out which argument the cursor points to */ |
1960 | cursor = lf->cursor - lf->buffer; | 1960 | cursor = lf->cursor - lf->buffer; |
1961 | line = (char *)xmalloc(cursor + 1); | 1961 | line = xmalloc(cursor + 1); |
1962 | memcpy(line, lf->buffer, cursor); | 1962 | memcpy(line, lf->buffer, cursor); |
1963 | line[cursor] = '\0'; | 1963 | line[cursor] = '\0'; |
1964 | argv = makeargv(line, &carg, 1, "e, &terminated); | 1964 | argv = makeargv(line, &carg, 1, "e, &terminated); |
@@ -1966,7 +1966,7 @@ complete(EditLine *el, int ch) | |||
1966 | 1966 | ||
1967 | /* Get all the arguments on the line */ | 1967 | /* Get all the arguments on the line */ |
1968 | len = lf->lastchar - lf->buffer; | 1968 | len = lf->lastchar - lf->buffer; |
1969 | line = (char *)xmalloc(len + 1); | 1969 | line = xmalloc(len + 1); |
1970 | memcpy(line, lf->buffer, len); | 1970 | memcpy(line, lf->buffer, len); |
1971 | line[len] = '\0'; | 1971 | line[len] = '\0'; |
1972 | argv = makeargv(line, &argc, 1, NULL, NULL); | 1972 | argv = makeargv(line, &argc, 1, NULL, NULL); |