summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Steven Moreland <smoreland@google.com> 2021-05-01 01:34:24 +0000
committer Steven Moreland <smoreland@google.com> 2021-05-01 01:59:57 +0000
commita4c94756f8358f0dac1dad7213c268c3894333c2 (patch)
tree53c2dbb9d72f9dcb603135ae651d1f6210ea90d5
parent82261324f24bc43e30e12476f242d63397858df0 (diff)
libbinder: modernize unique_fd&& -> unique_fd
The future can't wait! Bug: N/A Test: binderRpcTest Change-Id: I74b041853b528f38e5bc55e8738ec399622cbf1a
-rw-r--r--libs/binder/RpcConnection.cpp4
-rw-r--r--libs/binder/include/binder/RpcConnection.h4
2 files changed, 4 insertions, 4 deletions
diff --git a/libs/binder/RpcConnection.cpp b/libs/binder/RpcConnection.cpp
index ee5f50868a..fa228b2ab3 100644
--- a/libs/binder/RpcConnection.cpp
+++ b/libs/binder/RpcConnection.cpp
@@ -406,14 +406,14 @@ bool RpcConnection::setupOneSocketClient(const SocketAddress& addr) {
return true;
}
-void RpcConnection::addClient(unique_fd&& fd) {
+void RpcConnection::addClient(unique_fd fd) {
std::lock_guard<std::mutex> _l(mSocketMutex);
sp<ConnectionSocket> connection = sp<ConnectionSocket>::make();
connection->fd = std::move(fd);
mClients.push_back(connection);
}
-sp<RpcConnection::ConnectionSocket> RpcConnection::assignServerToThisThread(unique_fd&& fd) {
+sp<RpcConnection::ConnectionSocket> RpcConnection::assignServerToThisThread(unique_fd fd) {
std::lock_guard<std::mutex> _l(mSocketMutex);
sp<ConnectionSocket> connection = sp<ConnectionSocket>::make();
connection->fd = std::move(fd);
diff --git a/libs/binder/include/binder/RpcConnection.h b/libs/binder/include/binder/RpcConnection.h
index 3a2d8e581d..1b8f4b9a29 100644
--- a/libs/binder/include/binder/RpcConnection.h
+++ b/libs/binder/include/binder/RpcConnection.h
@@ -148,8 +148,8 @@ private:
bool setupSocketServer(const SocketAddress& address);
bool setupSocketClient(const SocketAddress& address);
bool setupOneSocketClient(const SocketAddress& address);
- void addClient(base::unique_fd&& fd);
- sp<ConnectionSocket> assignServerToThisThread(base::unique_fd&& fd);
+ void addClient(base::unique_fd fd);
+ sp<ConnectionSocket> assignServerToThisThread(base::unique_fd fd);
bool removeServerSocket(const sp<ConnectionSocket>& socket);
enum class SocketUse {