Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bf6e9497 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Change the CHECK failure into function failure." into oc-dev

parents 165dad79 3df060d6
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -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;
    }
}