From 3dcfa3fb1cec36b21ad026c618c85790a2353f72 Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Tue, 23 Aug 2016 12:50:00 -0700 Subject: 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 --- debuggerd/debuggerd.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'debuggerd/debuggerd.cpp') diff --git a/debuggerd/debuggerd.cpp b/debuggerd/debuggerd.cpp index c578d658b..5550bc07d 100644 --- a/debuggerd/debuggerd.cpp +++ b/debuggerd/debuggerd.cpp @@ -821,12 +821,8 @@ static int do_server() { ALOGI("debuggerd: starting\n"); for (;;) { - sockaddr_storage ss; - sockaddr* addrp = reinterpret_cast(&ss); - socklen_t alen = sizeof(ss); - ALOGV("waiting for connection\n"); - int fd = accept4(s, addrp, &alen, SOCK_CLOEXEC | SOCK_NONBLOCK); + int fd = accept4(s, nullptr, nullptr, SOCK_CLOEXEC | SOCK_NONBLOCK); if (fd == -1) { ALOGE("accept failed: %s\n", strerror(errno)); continue; -- cgit v1.2.3