diff options
author | TreeHugger Robot <treehugger-gerrit@google.com> | 2017-05-17 03:22:26 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2017-05-17 03:22:27 +0000 |
commit | bf6e949727d6d86a3e8e3fa5c5f641872134d2a1 (patch) | |
tree | 7dd688b5acc3df94fb062ee8a422d99861cfa3b8 /libappfuse/FuseBuffer.cc | |
parent | 165dad791d05975d6c13155246e256a379181dcf (diff) | |
parent | 3df060d6d0e953bacee8e7899d18b404b5a7262f (diff) | |
download | core-bf6e949727d6d86a3e8e3fa5c5f641872134d2a1.tar.gz core-bf6e949727d6d86a3e8e3fa5c5f641872134d2a1.tar.bz2 core-bf6e949727d6d86a3e8e3fa5c5f641872134d2a1.zip |
Merge "Change the CHECK failure into function failure." into oc-dev
Diffstat (limited to 'libappfuse/FuseBuffer.cc')
-rw-r--r-- | libappfuse/FuseBuffer.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libappfuse/FuseBuffer.cc b/libappfuse/FuseBuffer.cc index fd69849a7..653e96b28 100644 --- a/libappfuse/FuseBuffer.cc +++ b/libappfuse/FuseBuffer.cc @@ -119,7 +119,12 @@ ResultOrAgain WriteInternal(const FuseMessage<T>* self, int fd, int sockflag, co return ResultOrAgain::kFailure; } } - CHECK(static_cast<uint32_t>(result) == header.len); + + if (static_cast<unsigned int>(result) != header.len) { + LOG(ERROR) << "Written bytes " << result << " is different from length in header " + << header.len; + return ResultOrAgain::kFailure; + } return ResultOrAgain::kSuccess; } } |