adamdebreceni commented on a change in pull request #1083:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1083#discussion_r643787740



##########
File path: libminifi/src/io/FileStream.cpp
##########
@@ -113,34 +113,33 @@ void FileStream::seek(size_t offset) {
     logging::LOG_ERROR(logger_) << SEEK_ERROR_MSG << SEEKP_CALL_ERROR_MSG;
 }
 
-int FileStream::write(const uint8_t *value, int size) {
-  gsl_Expects(size >= 0);
+size_t FileStream::write(const uint8_t *value, size_t size) {
   if (size == 0) {
     return 0;
   }
   if (!IsNullOrEmpty(value)) {

Review comment:
       we could refactor all these (I counted 3) instances to use early return 
as you have done it in `SecureDescriptorStream.cpp`




-- 
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:
[email protected]


Reply via email to