On Thu, Sep 30, 2010 at 4:51 AM, Gustavo F. Padovan <padovan@xxxxxxxxxxxxxx> wrote: >> diff --git a/plugins/maemo6.c b/plugins/maemo6.c >> index c96731d..45d96b8 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) == >> + MCE_RADIO_STATE_BLUETOOTH; > > Alternatively you can do > mce_bt_set = !!(sigvalue & MCE_RADIO_STATE_BLUETOOTH) I'm a bit late, but: mce_bt_set = (sigvalue & MCE_RADIO_STATE_BLUETOOTH) != 0; would equally work. PS: yes, I know it's already commited. :). Interestingly, there is only one more occurrence of this idiom already in bluez code: input/device.c: connected = !!g_slist_find_custom(idev->connections, NULL, Regards, -- Anderson Lizardo OpenBossa Labs - INdT Manaus - Brazil -- 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