Bluetooth: Move double negation to macros

Some comparisons needs to double negation(!!) in order to make the value
of the field boolean. Add it to the macro makes the code more readable.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
This commit is contained in:
Gustavo Padovan 2012-11-23 16:50:51 -02:00
parent 20714bfef8
commit ffa88e02bc
3 changed files with 10 additions and 10 deletions

View file

@ -794,10 +794,10 @@ static void hci_set_le_support(struct hci_dev *hdev)
if (test_bit(HCI_LE_ENABLED, &hdev->dev_flags)) {
cp.le = 1;
cp.simul = !!lmp_le_br_capable(hdev);
cp.simul = lmp_le_br_capable(hdev);
}
if (cp.le != !!lmp_host_le_capable(hdev))
if (cp.le != lmp_host_le_capable(hdev))
hci_send_cmd(hdev, HCI_OP_WRITE_LE_HOST_SUPPORTED, sizeof(cp),
&cp);
}