summaryrefslogtreecommitdiffstats
path: root/adb
diff options
context:
space:
mode:
authorGreg Kaiser <gkaiser@google.com>2019-03-18 07:00:00 -0700
committerGreg Kaiser <gkaiser@google.com>2019-03-18 07:00:00 -0700
commit5fe40a66b27930c96ae6334993fbd8a1ea918903 (patch)
tree04ca212a1666c5654b168e60fc03f8a3c8250418 /adb
parentfc0f79f8a842b777281899eaac9a7dffaadbae44 (diff)
downloadsystem_core-5fe40a66b27930c96ae6334993fbd8a1ea918903.tar.gz
system_core-5fe40a66b27930c96ae6334993fbd8a1ea918903.tar.bz2
system_core-5fe40a66b27930c96ae6334993fbd8a1ea918903.zip
adb: Fix return value in error case
When we introduced __adb_check_server_version() as a function returning a 'bool', we missed missed converting once instance of "return -1;" to "return false;". Thus, we're returning 'true' in this case as our non-zero value gets implicitly converted to 'true'. We fix this case as well with this CL. Test: TreeHugger Change-Id: I90b01567d927f36d2d963561b676b3bfabfcee49
Diffstat (limited to 'adb')
-rw-r--r--adb/client/adb_client.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/adb/client/adb_client.cpp b/adb/client/adb_client.cpp
index 9fa827dd2..5a7bc8d66 100644
--- a/adb/client/adb_client.cpp
+++ b/adb/client/adb_client.cpp
@@ -259,7 +259,7 @@ static bool __adb_check_server_version(std::string* error) {
if (fd >= 0) {
std::string version_string;
if (!ReadProtocolString(fd, &version_string, error)) {
- return -1;
+ return false;
}
ReadOrderlyShutdown(fd);