summaryrefslogtreecommitdiffstats
path: root/debuggerd
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2016-08-23 12:50:00 -0700
committerElliott Hughes <enh@google.com>2016-08-23 12:50:00 -0700
commit3dcfa3fb1cec36b21ad026c618c85790a2353f72 (patch)
treeb5f5daae853a2c420873b40f92d4f18175d96abd /debuggerd
parent82b67fff06363c8e7a17058cb5ce748f21a27f11 (diff)
downloadsystem_core-3dcfa3fb1cec36b21ad026c618c85790a2353f72.tar.gz
system_core-3dcfa3fb1cec36b21ad026c618c85790a2353f72.tar.bz2
system_core-3dcfa3fb1cec36b21ad026c618c85790a2353f72.zip
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
Diffstat (limited to 'debuggerd')
-rw-r--r--debuggerd/debuggerd.cpp6
1 files changed, 1 insertions, 5 deletions
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<sockaddr*>(&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;