summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--etc/init.rc1
-rw-r--r--minadbd/adb_main.cpp6
-rw-r--r--minadbd/services.cpp6
3 files changed, 3 insertions, 10 deletions
diff --git a/etc/init.rc b/etc/init.rc
index 6c07c6027..0a4c6e9df 100644
--- a/etc/init.rc
+++ b/etc/init.rc
@@ -5,7 +5,6 @@ on early-init
start healthd
on init
- export PATH /sbin:/system/bin
export ANDROID_ROOT /system
export ANDROID_DATA /data
export EXTERNAL_STORAGE /sdcard
diff --git a/minadbd/adb_main.cpp b/minadbd/adb_main.cpp
index f6e240108..0e65386c4 100644
--- a/minadbd/adb_main.cpp
+++ b/minadbd/adb_main.cpp
@@ -26,13 +26,9 @@
#include "adb.h"
#include "transport.h"
-int adb_main(int is_daemon, int server_port)
-{
- atexit(usb_cleanup);
-
+int adb_main(int is_daemon, int server_port) {
adb_device_banner = "sideload";
- // No SIGCHLD. Let the service subproc handle its children.
signal(SIGPIPE, SIG_IGN);
init_transport_registration();
diff --git a/minadbd/services.cpp b/minadbd/services.cpp
index dd1fd7c4b..859463caf 100644
--- a/minadbd/services.cpp
+++ b/minadbd/services.cpp
@@ -61,8 +61,7 @@ static void sideload_host_service(int sfd, void* data) {
exit(result == 0 ? 0 : 1);
}
-static int create_service_thread(void (*func)(int, void *), void *cookie)
-{
+static int create_service_thread(void (*func)(int, void *), void *cookie) {
int s[2];
if(adb_socketpair(s)) {
printf("cannot create service socket pair\n");
@@ -75,8 +74,7 @@ static int create_service_thread(void (*func)(int, void *), void *cookie)
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]);