Linux bluetooth development
 help / color / mirror / Atom feed
From: Szymon Janc <szymon.janc@tieto.com>
To: <linux-bluetooth@vger.kernel.org>
Cc: Szymon Janc <szymon.janc@tieto.com>
Subject: [PATCH 08/10] SAP: Remove one line of indentation in sap_io_destroy
Date: Fri, 25 May 2012 16:21:00 +0200	[thread overview]
Message-ID: <1337955662-19016-8-git-send-email-szymon.janc@tieto.com> (raw)
In-Reply-To: <1337955662-19016-1-git-send-email-szymon.janc@tieto.com>

---
 sap/server.c |   26 +++++++++++++-------------
 1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/sap/server.c b/sap/server.c
index 98440e8..00c540e 100644
--- a/sap/server.c
+++ b/sap/server.c
@@ -1111,28 +1111,28 @@ static gboolean sap_io_cb(GIOChannel *io, GIOCondition cond, gpointer data)
 static void sap_io_destroy(void *data)
 {
 	struct sap_connection *conn = data;
+	gboolean connected = FALSE;
 
 	DBG("conn %p", conn);
 
-	if (conn && conn->io) {
-		gboolean connected = FALSE;
+	if (!conn || !conn->io)
+		return;
 
-		stop_guard_timer(conn);
+	stop_guard_timer(conn);
 
-		if (conn->state != SAP_STATE_CONNECT_IN_PROGRESS &&
-				conn->state != SAP_STATE_CONNECT_MODEM_BUSY)
-			emit_property_changed(connection, server->path,
+	if (conn->state != SAP_STATE_CONNECT_IN_PROGRESS &&
+			conn->state != SAP_STATE_CONNECT_MODEM_BUSY)
+		emit_property_changed(connection, server->path,
 					SAP_SERVER_INTERFACE, "Connected",
 					DBUS_TYPE_BOOLEAN, &connected);
 
-		if (conn->state == SAP_STATE_CONNECT_IN_PROGRESS ||
-				conn->state == SAP_STATE_CONNECT_MODEM_BUSY ||
-				conn->state == SAP_STATE_CONNECTED ||
-				conn->state == SAP_STATE_GRACEFUL_DISCONNECT)
-			sap_disconnect_req(NULL, 1);
+	if (conn->state == SAP_STATE_CONNECT_IN_PROGRESS ||
+			conn->state == SAP_STATE_CONNECT_MODEM_BUSY ||
+			conn->state == SAP_STATE_CONNECTED ||
+			conn->state == SAP_STATE_GRACEFUL_DISCONNECT)
+		sap_disconnect_req(NULL, 1);
 
-		sap_conn_remove(conn);
-	}
+	sap_conn_remove(conn);
 }
 
 static void sap_connect_cb(GIOChannel *io, GError *gerr, gpointer data)
-- 
on behalf of ST-Ericsson


  parent reply	other threads:[~2012-05-25 14:21 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-25 14:20 [PATCH 01/10] SAP: Remove not needed NULL pointer check in check_msg Szymon Janc
2012-05-25 14:20 ` [PATCH 02/10] SAP: Fix some code style issue Szymon Janc
2012-05-25 14:20 ` [PATCH 03/10] sap-dummy: Use constants when setting ongoing call status Szymon Janc
2012-05-25 14:20 ` [PATCH 04/10] sap-dummy: Small refactor to sap_connect_req Szymon Janc
2012-05-25 14:20 ` [PATCH 05/10] sap-dummy: Remove not needed includes Szymon Janc
2012-05-25 14:20 ` [PATCH 06/10] SAP: " Szymon Janc
2012-05-25 14:20 ` [PATCH 07/10] SAP: Remove not needed src field from struct sap_server Szymon Janc
2012-05-25 14:21 ` Szymon Janc [this message]
2012-05-25 14:21 ` [PATCH 09/10] sap-dummy: Fix DBus connection leak if interface registration failed Szymon Janc
2012-05-25 14:21 ` [PATCH 10/10] SAP: Remove not needed checks from disconnect_ind Szymon Janc
2012-05-27 19:42 ` [PATCH 01/10] SAP: Remove not needed NULL pointer check in check_msg Johan Hedberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1337955662-19016-8-git-send-email-szymon.janc@tieto.com \
    --to=szymon.janc@tieto.com \
    --cc=linux-bluetooth@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox