Improve the "device '(null)' not found" error.
Now we'll say "no devices found" if you haven't set ANDROID_SERIAL and
there's no device connected to default to.
Also clean up the relevant code a little.
Change-Id: Id254929629ce0888628d5ba8e67cd996ffbf9c8a
diff --git a/services.cpp b/services.cpp
index 2fd75ab..227f22a 100644
--- a/services.cpp
+++ b/services.cpp
@@ -528,7 +528,7 @@
std::string error_msg = "unknown error";
atransport* t = acquire_one_transport(sinfo->state, sinfo->transport_type, sinfo->serial,
&error_msg);
- if (t != 0) {
+ if (t != nullptr) {
SendOkay(fd);
} else {
SendFail(fd, error_msg);