Linux bluetooth development
 help / color / mirror / Atom feed
From: Rafal Michalski <michalski.raf@gmail.com>
To: linux-bluetooth@vger.kernel.org
Cc: Rafal Michalski <michalski.raf@gmail.com>
Subject: [PATCH] Adjust mce_bt_set flag to gboolean type values
Date: Wed, 13 Oct 2010 15:08:20 +0200	[thread overview]
Message-ID: <1286975300-2832-1-git-send-email-michalski.raf@gmail.com> (raw)

This patch makes assignment to mce_bt_set flag more readable and makes
sure that it takes only TRUE or FALSE value from gboolean type.
---
 plugins/maemo6.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/plugins/maemo6.c b/plugins/maemo6.c
index c396db0..0a1e551 100644
--- a/plugins/maemo6.c
+++ b/plugins/maemo6.c
@@ -71,7 +71,8 @@ static gboolean mce_signal_callback(DBusConnection *connection,
 
 		/* set the adapter according to the mce signal
 		   and remember the value */
-		mce_bt_set = !!(sigvalue & MCE_RADIO_STATE_BLUETOOTH);
+		mce_bt_set = sigvalue & MCE_RADIO_STATE_BLUETOOTH ?
+								TRUE : FALSE;
 
 		if (mce_bt_set)
 			btd_adapter_switch_online(adapter);
@@ -111,7 +112,7 @@ static void read_radio_states_cb(DBusPendingCall *call, void *user_data)
 
 	DBG("radio_states: %d", radio_states);
 
-	mce_bt_set = radio_states & MCE_RADIO_STATE_BLUETOOTH;
+	mce_bt_set = radio_states & MCE_RADIO_STATE_BLUETOOTH ? TRUE : FALSE;
 
 	/* check if the adapter has not completed the initial power
 	 * cycle, if so delay action to mce_notify_powered */
-- 
1.6.3.3


             reply	other threads:[~2010-10-13 13:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-13 13:08 Rafal Michalski [this message]
2010-10-13 14:24 ` [PATCH] Adjust mce_bt_set flag to gboolean type values 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=1286975300-2832-1-git-send-email-michalski.raf@gmail.com \
    --to=michalski.raf@gmail.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