[PATCH 07/10] Bluetooth: Do not use assignments in IF conditions

From
Szymon Janc <hidden>
Date
2011-03-21 13:20:03
Reply to
Szymon Janc, 2011-03-21
Fix checkpatch warnings concerning assignments in if conditions.

Signed-off-by: Szymon Janc <redacted>
---
 net/bluetooth/cmtp/core.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/net/bluetooth/cmtp/core.c b/net/bluetooth/cmtp/core.c
index 964ea91..16aa6bd 100644
--- a/net/bluetooth/cmtp/core.c
+++ b/net/bluetooth/cmtp/core.c
@@ -235,9 +235,12 @@ static void cmtp_process_transmit(struct cmtp_session *session)
 
 		size = min_t(uint, ((tail < 258) ? (tail - 2) : (tail - 3)), skb->len);
 
-		if ((scb->id < 0) && ((scb->id = cmtp_alloc_block_id(session)) < 0)) {
-			skb_queue_head(&session->transmit, skb);
-			break;
+		if (scb->id < 0) {
+			scb->id = cmtp_alloc_block_id(session);
+			if (scb->id < 0) {
+				skb_queue_head(&session->transmit, skb);
+				break;
+			}
 		}
 
 		if (size < 256) {
-- 
1.7.0.4
Thread (16 messages) 16 messages, 2 authors, last reply 2011-04-05
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help