summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Treehugger Robot <treehugger-gerrit@google.com> 2022-08-03 22:02:17 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2022-08-03 22:02:17 +0000
commit2a2071242b50626ea931c116279b93b7d4076b5e (patch)
tree9ce529f1abb8f14b8ad506ace03e389328ec671c
parent10661889c47d30fff88c8ba13a5d01a6357a2609 (diff)
parentb14d3e50edca61ed8ca969af0eb936a1fc9c387d (diff)
Merge "libbinder: fix type of return value from {send,read}_msg"
-rw-r--r--libs/binder/trusty/RpcTransportTipcTrusty.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/libs/binder/trusty/RpcTransportTipcTrusty.cpp b/libs/binder/trusty/RpcTransportTipcTrusty.cpp
index e0d80fbe7b..dc27eb929c 100644
--- a/libs/binder/trusty/RpcTransportTipcTrusty.cpp
+++ b/libs/binder/trusty/RpcTransportTipcTrusty.cpp
@@ -64,7 +64,7 @@ public:
.num_handles = 0, // TODO: add ancillaryFds
.handles = nullptr,
};
- int rc = send_msg(mSocket.get(), &msg);
+ ssize_t rc = send_msg(mSocket.get(), &msg);
if (rc == ERR_NOT_ENOUGH_BUFFER) {
// Peer is blocked, wait until it unblocks.
// TODO: when tipc supports a send-unblocked handler,
@@ -89,7 +89,7 @@ public:
return statusFromTrusty(rc);
}
LOG_ALWAYS_FATAL_IF(static_cast<size_t>(rc) != size,
- "Sent the wrong number of bytes %d!=%zu", rc, size);
+ "Sent the wrong number of bytes %zd!=%zu", rc, size);
return OK;
}
@@ -129,7 +129,7 @@ public:
.num_handles = 0, // TODO: support ancillaryFds
.handles = nullptr,
};
- int rc = read_msg(mSocket.get(), mMessageInfo.id, mMessageOffset, &msg);
+ ssize_t rc = read_msg(mSocket.get(), mMessageInfo.id, mMessageOffset, &msg);
if (rc < 0) {
return statusFromTrusty(rc);
}