From c413422b76316a2c1894732ba9129512b3d68c41 Mon Sep 17 00:00:00 2001 From: Marcin Kondej Date: Tue, 8 Jan 2019 17:29:15 +0100 Subject: [PATCH] Removed unnecessary code --- wave_reader.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/wave_reader.cpp b/wave_reader.cpp index f27947c..749f953 100644 --- a/wave_reader.cpp +++ b/wave_reader.cpp @@ -119,10 +119,6 @@ vector *WaveReader::readData(unsigned bytesToRead, bool headerBytes, bool (((unsigned)bytes < bytesToRead) && headerBytes && (fileDescriptor != STDIN_FILENO))) { delete data; - if (fileDescriptor != STDIN_FILENO) { - close(fileDescriptor); - } - ostringstream oss; oss << "Error while reading " << getFilename() << ", file is corrupted"; throw ErrorReporter(oss.str());