Simplify adb_thread_create.
Change-Id: I36d6021ef8fbc23e8bcd4ddbe1dac0eba467cc70
diff --git a/adb/usb_osx.cpp b/adb/usb_osx.cpp
index a795ce3..0d0b3ad 100644
--- a/adb/usb_osx.cpp
+++ b/adb/usb_osx.cpp
@@ -398,22 +398,20 @@
IONotificationPortDestroy(notificationPort);
DBG("RunLoopThread done\n");
- return NULL;
+ return NULL;
}
static int initialized = 0;
-void usb_init()
-{
+void usb_init() {
if (!initialized)
{
- adb_thread_t tid;
-
adb_mutex_init(&start_lock, NULL);
adb_cond_init(&start_cond, NULL);
- if(adb_thread_create(&tid, RunLoopThread, NULL))
+ if (!adb_thread_create(RunLoopThread, nullptr)) {
fatal_errno("cannot create input thread");
+ }
// Wait for initialization to finish
adb_mutex_lock(&start_lock);