Most accept/accept4 calls in system/core don't actually want the remote address.
So don't write the extra code for it or waste the kernel's time
copying it around.
Change-Id: I93de64064c2d4fe58ba5b5322cfa69bf31a76dad
diff --git a/socket_test.cpp b/socket_test.cpp
index d2ce2d8..2bb01a3 100644
--- a/socket_test.cpp
+++ b/socket_test.cpp
@@ -254,10 +254,7 @@
ASSERT_TRUE(adb_thread_create(reinterpret_cast<void (*)(void*)>(ClientThreadFunc), nullptr,
&client_thread));
- struct sockaddr addr;
- socklen_t alen;
- alen = sizeof(addr);
- int accept_fd = adb_socket_accept(listen_fd, &addr, &alen);
+ int accept_fd = adb_socket_accept(listen_fd, nullptr, nullptr);
ASSERT_GE(accept_fd, 0);
CloseRdHupSocketArg arg;
arg.socket_fd = accept_fd;