Fix return types of sendMessageOnSocket/receiveMessageFromSocket
recvmsg() and sendmsg() return ssize_t but the wrapper functions
returned int. Fix the return type.
Bug: 250685929
Test: atest rpcBinderTest
Change-Id: Ia3f7f58e286f24a8711aed97d9bc2b3cf6b78f0d
diff --git a/libs/binder/RpcTransportRaw.cpp b/libs/binder/RpcTransportRaw.cpp
index 1912d14..cd067bf 100644
--- a/libs/binder/RpcTransportRaw.cpp
+++ b/libs/binder/RpcTransportRaw.cpp
@@ -61,7 +61,8 @@
override {
bool sentFds = false;
auto send = [&](iovec* iovs, int niovs) -> ssize_t {
- int ret = sendMessageOnSocket(mSocket, iovs, niovs, sentFds ? nullptr : ancillaryFds);
+ ssize_t ret =
+ sendMessageOnSocket(mSocket, iovs, niovs, sentFds ? nullptr : ancillaryFds);
sentFds |= ret > 0;
return ret;
};