[PATCHv2 4/6] tools/rctest: Remove dead code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Andrei Emeltchenko <andrei.emeltchenko@xxxxxxxxx>

Since do_listen() never returns remove hanging code
---
 tools/rctest.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/tools/rctest.c b/tools/rctest.c
index a09a973..e61f7e2 100644
--- a/tools/rctest.c
+++ b/tools/rctest.c
@@ -629,10 +629,8 @@ static void automated_send_recv()
 	char device[18];
 
 	if (fork()) {
-		if (!savefile) {
+		if (!savefile)
 			do_listen(recv_mode);
-			return;
-		}
 
 		save_fd = open(savefile, O_CREAT | O_WRONLY,
 						S_IRUSR | S_IWUSR);
@@ -640,8 +638,6 @@ static void automated_send_recv()
 			syslog(LOG_ERR, "Failed to open file to save data");
 
 		do_listen(save_mode);
-
-		close(save_fd);
 	} else {
 		ba2str(&bdaddr, device);
 
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux