From c3964f68e251e3a80f952e2014b2b5dc738aff4c Mon Sep 17 00:00:00 2001 From: David Brazdil Date: Mon, 24 Oct 2022 23:06:14 +0100 Subject: 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 --- libs/binder/OS.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libs/binder/OS.cpp') diff --git a/libs/binder/OS.cpp b/libs/binder/OS.cpp index 77e401f83e..ce60e33ba7 100644 --- a/libs/binder/OS.cpp +++ b/libs/binder/OS.cpp @@ -67,7 +67,7 @@ std::unique_ptr makeDefaultRpcTransportCtxFactory() { return RpcTransportCtxFactoryRaw::make(); } -int sendMessageOnSocket( +ssize_t sendMessageOnSocket( const RpcTransportFd& socket, iovec* iovs, int niovs, const std::vector>* ancillaryFds) { if (ancillaryFds != nullptr && !ancillaryFds->empty()) { @@ -112,7 +112,7 @@ int sendMessageOnSocket( return TEMP_FAILURE_RETRY(sendmsg(socket.fd.get(), &msg, MSG_NOSIGNAL)); } -int receiveMessageFromSocket( +ssize_t receiveMessageFromSocket( const RpcTransportFd& socket, iovec* iovs, int niovs, std::vector>* ancillaryFds) { if (ancillaryFds != nullptr) { -- cgit v1.2.3-59-g8ed1b