diff options
author | The Android Open Source Project <initial-contribution@android.com> | 2010-06-15 11:27:36 -0700 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2010-06-15 11:27:36 -0700 |
commit | d9a1904d3f873f7733e3b7b91c70027781b463c5 (patch) | |
tree | 7afac3e2584d98aad2a1d8b09d72f7fcd090dec8 /adb | |
parent | 6f29e5a27b552297295f5570d2de6a8bc9e76738 (diff) | |
parent | 7b67993a9efc90825d42455cc72dd80a3876a2cd (diff) | |
download | system_core-d9a1904d3f873f7733e3b7b91c70027781b463c5.zip system_core-d9a1904d3f873f7733e3b7b91c70027781b463c5.tar.gz system_core-d9a1904d3f873f7733e3b7b91c70027781b463c5.tar.bz2 |
merge from open-source master
Change-Id: I14853c1f8a1d392d7ee9dfae3914d9ee3107794c
Diffstat (limited to 'adb')
-rw-r--r-- | adb/sockets.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/adb/sockets.c b/adb/sockets.c index 6d1c89b..43925e4 100644 --- a/adb/sockets.c +++ b/adb/sockets.c @@ -65,8 +65,11 @@ asocket *find_local_socket(unsigned id) asocket *result = NULL; adb_mutex_lock(&socket_list_lock); - for(s = local_socket_list.next; s != &local_socket_list && !result; s = s->next) { - if(s->id == id) result = s; + for (s = local_socket_list.next; s != &local_socket_list; s = s->next) { + if (s->id == id) { + result = s; + break; + } } adb_mutex_unlock(&socket_list_lock); |