adamdebreceni commented on a change in pull request #1028: URL: https://github.com/apache/nifi-minifi-cpp/pull/1028#discussion_r601282015
########## File path: extensions/libarchive/CompressContent.h ########## @@ -383,13 +377,14 @@ class CompressContent: public core::Processor { std::vector<uint8_t> buffer(16 * 1024U); int64_t read_size = 0; while (read_size < gsl::narrow<int64_t>(writer_.flow_->getSize())) { - int ret = inputStream->read(buffer.data(), gsl::narrow<int>(buffer.size())); - if (ret < 0) { + const auto ret = inputStream->read(buffer.data(), buffer.size()); + if (io::isError(ret)) { return -1; } else if (ret == 0) { break; } else { - if (outputStream_->write(buffer.data(), ret) != ret) { + const auto writeret = outputStream_->write(buffer.data(), ret); + if (!io::isError(writeret) && gsl::narrow<size_t>(writeret) != ret) { Review comment: previously this returned -1 on error, shouldn't it be? ```suggestion if (io::isError(writeret) || gsl::narrow<size_t>(writeret) != ret) { ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org