szaszm commented on a change in pull request #1083: URL: https://github.com/apache/nifi-minifi-cpp/pull/1083#discussion_r643987776
########## File path: extensions/libarchive/CompressContent.h ########## @@ -180,11 +180,11 @@ class CompressContent : public core::Processor { int status_; static la_ssize_t archive_write(struct archive* /*arch*/, void *context, const void *buff, size_t size) { - WriteCallback *callback = (WriteCallback *) context; - la_ssize_t ret = callback->stream_->write(reinterpret_cast<uint8_t*>(const_cast<void*>(buff)), gsl::narrow<int>(size)); - if (ret > 0) - callback->size_ += (int64_t) ret; - return ret; + auto* const callback = static_cast<WriteCallback*>(context); + const auto ret = callback->stream_->write(reinterpret_cast<uint8_t*>(const_cast<void*>(buff)), size); + if (ret > 0 && !io::isError(ret)) Review comment: done in 5c6ba7b -- 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