reader.cpp: remove unused pointer in read_ni

literally prehistoric in git blame
This commit is contained in:
Aaron Gyes 2019-10-14 00:42:03 -07:00
parent 4b6de8b4a3
commit 5d84d3fe48

View file

@ -3483,7 +3483,6 @@ bool reader_get_selection(size_t *start, size_t *len) {
/// highlighting. This is used for reading scripts and init files. /// highlighting. This is used for reading scripts and init files.
static int read_ni(parser_t &parser, int fd, const io_chain_t &io) { static int read_ni(parser_t &parser, int fd, const io_chain_t &io) {
FILE *in_stream; FILE *in_stream;
wchar_t *buff = 0;
std::vector<char> acc; std::vector<char> acc;
int des = (fd == STDIN_FILENO ? dup(STDIN_FILENO) : fd); int des = (fd == STDIN_FILENO ? dup(STDIN_FILENO) : fd);
@ -3511,7 +3510,7 @@ static int read_ni(parser_t &parser, int fd, const io_chain_t &io) {
clearerr(in_stream); clearerr(in_stream);
} else { } else {
// Fatal error. // Fatal error.
debug(1, _(L"Error while reading from file descriptor")); debug(1, _(L"Error while reading input file"));
// Reset buffer on error. We won't evaluate incomplete files. // Reset buffer on error. We won't evaluate incomplete files.
acc.clear(); acc.clear();
break; break;
@ -3549,7 +3548,6 @@ static int read_ni(parser_t &parser, int fd, const io_chain_t &io) {
} else { } else {
debug(1, _(L"Error while opening input stream")); debug(1, _(L"Error while opening input stream"));
wperror(L"fdopen"); wperror(L"fdopen");
free(buff);
res = 1; res = 1;
} }
return res; return res;