Skip to content

Commit

Permalink
Bluetooth: Fix coding style issues in mgmt code
Browse files Browse the repository at this point in the history
In this case we need to use braces in both branches.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
  • Loading branch information
Andrei Emeltchenko authored and Johan Hedberg committed Feb 23, 2012
1 parent 70c1f20 commit 6bf0e46
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions net/bluetooth/mgmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -952,9 +952,9 @@ static int set_connectable(struct sock *sk, u16 index, void *data, u16 len)
if (!!cp->val != test_bit(HCI_CONNECTABLE, &hdev->dev_flags))
changed = true;

if (cp->val)
if (cp->val) {
set_bit(HCI_CONNECTABLE, &hdev->dev_flags);
else {
} else {
clear_bit(HCI_CONNECTABLE, &hdev->dev_flags);
clear_bit(HCI_DISCOVERABLE, &hdev->dev_flags);
}
Expand Down Expand Up @@ -987,9 +987,9 @@ static int set_connectable(struct sock *sk, u16 index, void *data, u16 len)
goto failed;
}

if (cp->val)
if (cp->val) {
scan = SCAN_PAGE;
else {
} else {
scan = 0;

if (test_bit(HCI_ISCAN, &hdev->flags) &&
Expand Down

0 comments on commit 6bf0e46

Please sign in to comment.