[PATCH] Bluetooth: Fix coding style issues in mgmt code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Andrei Emeltchenko <andrei.emeltchenko@xxxxxxxxx>

In this case we need to use braces in both branches.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@xxxxxxxxx>
---
 net/bluetooth/mgmt.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index e8f890d..7cb52df 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -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);
 		}
@@ -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) &&
-- 
1.7.9

--
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


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux