diff options
author | 2023-11-02 15:07:45 -0700 | |
---|---|---|
committer | 2023-11-03 09:40:33 -0700 | |
commit | df07f945b946fd1f7039d225ecd3de51a901ace7 (patch) | |
tree | 1f37c190b6cd567549cfd14f3efca5eeb18c19a7 /libs/binder/RpcState.cpp | |
parent | d429f318b42341f27d035072193c2d5da0826e93 (diff) |
Binder: migrate off libbase macros
Test: mma
Bug: 302723053
Change-Id: Ie7c13c324311f600d72bc8ecc4157ad6c46259a0
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()); } |