summaryrefslogtreecommitdiffstats
path: root/libion/ion_test.c
diff options
context:
space:
mode:
authorAndreas Gampe <agampe@google.com>2014-11-24 19:31:40 -0800
committerAndreas Gampe <agampe@google.com>2014-11-25 10:16:06 -0800
commitf0a54c17d894391a69bfa6c11b474c5b851b762e (patch)
tree38bfa640e51c9646ae99aeb4cdea4ce8f04c129e /libion/ion_test.c
parent1690b49e631904759737176b4bb285d446655f5d (diff)
downloadsystem_core-f0a54c17d894391a69bfa6c11b474c5b851b762e.zip
system_core-f0a54c17d894391a69bfa6c11b474c5b851b762e.tar.gz
system_core-f0a54c17d894391a69bfa6c11b474c5b851b762e.tar.bz2
Libion: Remove unused variables
For build-system CFLAGS clean-up, fix unused variables. Fix missing close of file descriptors. Explicitly exit after a fork. Change-Id: I76affbc8647c3a760ed3cacc7f3ada3f59e283b1
Diffstat (limited to 'libion/ion_test.c')
-rw-r--r--libion/ion_test.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libion/ion_test.c b/libion/ion_test.c
index 8872282..b7d5583 100644
--- a/libion/ion_test.c
+++ b/libion/ion_test.c
@@ -164,8 +164,9 @@ void ion_share_test()
printf("master->master? [%10s]\n", ptr);
if (recvmsg(sd[0], &msg, 0) < 0)
perror("master recv 1");
+ close(fd);
+ _exit(0);
} else {
- struct msghdr msg;
struct cmsghdr *cmsg;
char* ptr;
int fd, recv_fd;
@@ -205,6 +206,7 @@ void ion_share_test()
strcpy(ptr, "child");
printf("child sending msg 2\n");
sendmsg(sd[1], &child_msg, 0);
+ close(fd);
}
}