diff options
author | Josh Gao <jmgao@google.com> | 2017-10-20 17:57:42 -0700 |
---|---|---|
committer | Josh Gao <jmgao@google.com> | 2017-10-20 18:03:48 -0700 |
commit | 4dfaa88610f3dfdc6ad81e93998948e545866ec4 (patch) | |
tree | d23c046fac0842a75f89d2fcdfc104045235bbb4 /adb | |
parent | d72d92aee2d125f6a8d26932e6482bea5398b92c (diff) | |
download | system_core-4dfaa88610f3dfdc6ad81e93998948e545866ec4.tar.gz system_core-4dfaa88610f3dfdc6ad81e93998948e545866ec4.tar.bz2 system_core-4dfaa88610f3dfdc6ad81e93998948e545866ec4.zip |
adb: fix erase-remove_if idiom.
This probably doesn't have any actual effect, because there should only
be one smartsocket listener so this will happen to work, but this looks
sketchy.
Test: mma
Test: adb server nodaemon & (sleep 1; adb kill-server)
Change-Id: Id00ab1fc1fc029949c675ae6e3b1a77f3e9e4c69
Diffstat (limited to 'adb')
-rw-r--r-- | adb/adb_listeners.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/adb/adb_listeners.cpp b/adb/adb_listeners.cpp index 30cb29b88..a142384be 100644 --- a/adb/adb_listeners.cpp +++ b/adb/adb_listeners.cpp @@ -172,7 +172,7 @@ void close_smartsockets() EXCLUDES(listener_list_mutex) { auto pred = [](const std::unique_ptr<alistener>& listener) { return listener->local_name == "*smartsocket*"; }; - listener_list.erase(std::remove_if(listener_list.begin(), listener_list.end(), pred)); + listener_list.remove_if(pred); } InstallStatus install_listener(const std::string& local_name, const char* connect_to, |