Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH 01/15] android: Remove not needed local variable in connect_hal
@ 2013-10-25  8:56 Szymon Janc
  2013-10-25  8:56 ` [PATCH 02/15] android: Add properties defines to hal-msg.h Szymon Janc
                   ` (13 more replies)
  0 siblings, 14 replies; 17+ messages in thread
From: Szymon Janc @ 2013-10-25  8:56 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Szymon Janc

err variable was set but never read.
---
 android/main.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/android/main.c b/android/main.c
index 50b5901..18dc9f7 100644
--- a/android/main.c
+++ b/android/main.c
@@ -239,12 +239,12 @@ static GIOChannel *connect_hal(GIOFunc connect_cb)
 	struct sockaddr_un addr;
 	GIOCondition cond;
 	GIOChannel *io;
-	int err, sk;
+	int sk;
 
 	sk = socket(PF_LOCAL, SOCK_SEQPACKET, 0);
 	if (sk < 0) {
-		err = errno;
-		error("Failed to create socket: %d (%s)", err, strerror(err));
+		error("Failed to create socket: %d (%s)", errno,
+							strerror(errno));
 		return NULL;
 	}
 
@@ -258,9 +258,7 @@ static GIOChannel *connect_hal(GIOFunc connect_cb)
 
 	memcpy(addr.sun_path, BLUEZ_HAL_SK_PATH, sizeof(BLUEZ_HAL_SK_PATH));
 
-	err = connect(sk, (struct sockaddr *) &addr, sizeof(addr));
-	if (err < 0) {
-		err = -errno;
+	if (connect(sk, (struct sockaddr *) &addr, sizeof(addr)) < 0) {
 		error("Failed to connect HAL socket: %d (%s)", errno,
 							strerror(errno));
 		g_io_channel_unref(io);
-- 
1.8.4.1


^ permalink raw reply related	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2013-10-25 10:15 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-25  8:56 [PATCH 01/15] android: Remove not needed local variable in connect_hal Szymon Janc
2013-10-25  8:56 ` [PATCH 02/15] android: Add properties defines to hal-msg.h Szymon Janc
2013-10-25  8:56 ` [PATCH 03/15] android/hal: Add support for sending adapter set property command Szymon Janc
2013-10-25  8:56 ` [PATCH 04/15] android/hal: Add support for sending adapter get " Szymon Janc
2013-10-25  8:56 ` [PATCH 05/15] android/hal: Add support for sending adapter get properties command Szymon Janc
2013-10-25  8:56 ` [PATCH 06/15] android/hal: Add support for sending create bond command Szymon Janc
2013-10-25  9:36   ` Andrei Emeltchenko
2013-10-25 10:15     ` Luiz Augusto von Dentz
2013-10-25  8:56 ` [PATCH 07/15] android/hal: Add support for sending cancel " Szymon Janc
2013-10-25  8:56 ` [PATCH 08/15] android/hal: Add support for sending adapter remove " Szymon Janc
2013-10-25  8:56 ` [PATCH 09/15] android/hal: Add support for sending adapter PIN reply command Szymon Janc
2013-10-25  8:56 ` [PATCH 10/15] android: Add missing SSP Variant definitions to IPC document Szymon Janc
2013-10-25  8:56 ` [PATCH 11/15] android: Add missing SSP variant definitions to IPC header Szymon Janc
2013-10-25  8:56 ` [PATCH 12/15] android/hal: Add support for sending adapter SSP reply command Szymon Janc
2013-10-25  8:56 ` [PATCH 13/15] android/hal: Add support for handling adapter properties change event Szymon Janc
2013-10-25  8:56 ` [PATCH 14/15] android: Add missing success status definition to IPC header Szymon Janc
2013-10-25  8:56 ` [PATCH 15/15] android: Add initial support for handling adapter get property command Szymon Janc

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox