diff options
| author | 2023-11-03 17:20:41 +0000 | |
|---|---|---|
| committer | 2023-11-03 17:20:41 +0000 | |
| commit | 6da313b7f2269fc2a84d7c202d7947312bfd9bd6 (patch) | |
| tree | 0659c5e85b7eac08673beaa207b45aa71394805e /libs/binder/RpcState.cpp | |
| parent | 1f2f3de8ffeabe6d0816f3140cd5cb89840bb1a2 (diff) | |
| parent | df07f945b946fd1f7039d225ecd3de51a901ace7 (diff) | |
Merge "Binder: migrate off libbase macros" into main
Diffstat (limited to 'libs/binder/RpcState.cpp')
| -rw-r--r-- | libs/binder/RpcState.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/libs/binder/RpcState.cpp b/libs/binder/RpcState.cpp index 749c2f81ea..964a5c4ff9 100644 --- a/libs/binder/RpcState.cpp +++ b/libs/binder/RpcState.cpp @@ -18,7 +18,6 @@ #include "RpcState.h" -#include <android-base/macros.h> #include <android-base/scopeguard.h> #include <binder/BpBinder.h> #include <binder/IPCThreadState.h> @@ -601,7 +600,7 @@ status_t RpcState::transactAddress(const sp<RpcSession::RpcConnection>& connecti objectTableSpan.toIovec(), }; if (status_t status = rpcSend( - connection, session, "transaction", iovs, arraysize(iovs), + connection, session, "transaction", iovs, countof(iovs), [&] { if (waitUs > kWaitLogUs) { ALOGE("Cannot send command, trying to process pending refcounts. Waiting " @@ -690,7 +689,7 @@ status_t RpcState::waitForReply(const sp<RpcSession::RpcConnection>& connection, {&rpcReply, rpcReplyWireSize}, {data.data(), data.size()}, }; - if (status_t status = rpcRec(connection, session, "reply body", iovs, arraysize(iovs), nullptr); + if (status_t status = rpcRec(connection, session, "reply body", iovs, countof(iovs), nullptr); status != OK) return status; @@ -760,7 +759,7 @@ status_t RpcState::sendDecStrongToTarget(const sp<RpcSession::RpcConnection>& co .bodySize = sizeof(RpcDecStrong), }; iovec iovs[]{{&cmd, sizeof(cmd)}, {&body, sizeof(body)}}; - return rpcSend(connection, session, "dec ref", iovs, arraysize(iovs), std::nullopt); + return rpcSend(connection, session, "dec ref", iovs, countof(iovs), std::nullopt); } status_t RpcState::getAndExecuteCommand(const sp<RpcSession::RpcConnection>& connection, @@ -1143,7 +1142,7 @@ processTransactInternalTailCall: {const_cast<uint8_t*>(reply.data()), reply.dataSize()}, objectTableSpan.toIovec(), }; - return rpcSend(connection, session, "reply", iovs, arraysize(iovs), std::nullopt, + return rpcSend(connection, session, "reply", iovs, countof(iovs), std::nullopt, rpcFields->mFds.get()); } |