Simplify adb_thread_create.
Change-Id: I36d6021ef8fbc23e8bcd4ddbe1dac0eba467cc70
diff --git a/services.cpp b/services.cpp
index 7e47729..e53a28c 100644
--- a/services.cpp
+++ b/services.cpp
@@ -210,8 +210,7 @@
sti->cookie = cookie;
sti->fd = s[1];
- adb_thread_t t;
- if (adb_thread_create(&t, service_bootstrap_func, sti)) {
+ if (!adb_thread_create(service_bootstrap_func, sti)) {
free(sti);
adb_close(s[0]);
adb_close(s[1]);
@@ -401,8 +400,7 @@
sti->cookie = (void*) (uintptr_t) pid;
sti->fd = ret_fd;
- adb_thread_t t;
- if (adb_thread_create(&t, service_bootstrap_func, sti)) {
+ if (!adb_thread_create(service_bootstrap_func, sti)) {
free(sti);
adb_close(ret_fd);
fprintf(stderr, "cannot create service thread\n");