summaryrefslogtreecommitdiff
path: root/libs/binder/RpcState.cpp
diff options
context:
space:
mode:
author Yifan Hong <elsk@google.com> 2021-08-05 21:20:49 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2021-08-05 21:20:49 +0000
commit176a33a2b48a6f0da85cd1eb820577fea3a60551 (patch)
tree353b1857e43f8cc3ced61d5f4425dcbc967e7a3d /libs/binder/RpcState.cpp
parent91c6a9f5d8a7a4af33998de62b72e15bc1a3b9bb (diff)
parent218c4070b9b274e604d77cf284140a1f73859a2a (diff)
Merge "binder: RpcTransport: change to size_t."
Diffstat (limited to 'libs/binder/RpcState.cpp')
-rw-r--r--libs/binder/RpcState.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libs/binder/RpcState.cpp b/libs/binder/RpcState.cpp
index 6563bc85aa..23382c3858 100644
--- a/libs/binder/RpcState.cpp
+++ b/libs/binder/RpcState.cpp
@@ -601,7 +601,7 @@ status_t RpcState::getAndExecuteCommand(const sp<RpcSession::RpcConnection>& con
status_t RpcState::drainCommands(const sp<RpcSession::RpcConnection>& connection,
const sp<RpcSession>& session, CommandType type) {
uint8_t buf;
- while (connection->rpcTransport->peek(&buf, sizeof(buf)).value_or(-1) > 0) {
+ while (connection->rpcTransport->peek(&buf, sizeof(buf)).value_or(0) > 0) {
status_t status = getAndExecuteCommand(connection, session, type);
if (status != OK) return status;
}