summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2015-01-14 16:59:44 +0100
committerMatthias Schiffer <mschiffer@universe-factory.net>2015-01-14 17:29:41 +0100
commit6a5fa572cf2f0dbdae6936ff44edc1be82a6e13a (patch)
treeca70f0ce4ed9cae03d3b319b45e6e8f19fcffd04
parentc4378784ae2caec57634f9f04bcb3dcddc673f36 (diff)
downloadfastd-6a5fa572cf2f0dbdae6936ff44edc1be82a6e13a.tar
fastd-6a5fa572cf2f0dbdae6936ff44edc1be82a6e13a.zip
android_ctrl_sock: include and whitespace cleanup
-rw-r--r--src/android_ctrl_sock.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/android_ctrl_sock.c b/src/android_ctrl_sock.c
index c681755..8be17a5 100644
--- a/src/android_ctrl_sock.c
+++ b/src/android_ctrl_sock.c
@@ -47,12 +47,10 @@
#ifdef __ANDROID__
-#include <stdlib.h>
-#include <sys/socket.h>
+#include "fastd.h"
+
#include <sys/un.h>
-#include <unistd.h>
-#include "fastd.h"
/** declare a work buffer for sending/receiving \e n handles */
#define ANCIL_FD_BUFFER(n) \
@@ -205,7 +203,7 @@ bool fastd_android_protect_socket(int fd) {
pr_debug("sending fd to protect");
if (ancil_send_fd(ctx.android_ctrl_sock_fd, fd) == -1) {
exit_errno("could not send handle to Android for protecting");
- }
+ }
char buf[20];
if (read(ctx.android_ctrl_sock_fd, buf, sizeof(buf)) == -1) {