From 5d84d3fe48095f6444d4eb635c5224900670ccec Mon Sep 17 00:00:00 2001 From: Aaron Gyes Date: Mon, 14 Oct 2019 00:42:03 -0700 Subject: [PATCH] reader.cpp: remove unused pointer in read_ni literally prehistoric in git blame --- src/reader.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/reader.cpp b/src/reader.cpp index 13713bd92..2cce0527a 100644 --- a/src/reader.cpp +++ b/src/reader.cpp @@ -3483,7 +3483,6 @@ bool reader_get_selection(size_t *start, size_t *len) { /// highlighting. This is used for reading scripts and init files. static int read_ni(parser_t &parser, int fd, const io_chain_t &io) { FILE *in_stream; - wchar_t *buff = 0; std::vector acc; 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); } else { // 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. acc.clear(); break; @@ -3549,7 +3548,6 @@ static int read_ni(parser_t &parser, int fd, const io_chain_t &io) { } else { debug(1, _(L"Error while opening input stream")); wperror(L"fdopen"); - free(buff); res = 1; } return res;