Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH 1/2] tools/btsnoop : Fix variable reassigning issue
@ 2014-09-10  6:35 gowtham babu
  2014-09-12 16:51 ` Johan Hedberg
  0 siblings, 1 reply; 3+ messages in thread
From: gowtham babu @ 2014-09-10  6:35 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: bharat.panda, cpgs, gowtham babu

The Variable 'written' is reassigned a value before the old one has been used.
The below on fix the same.
---
 tools/btsnoop.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/btsnoop.c b/tools/btsnoop.c
index 6ca62d2..86f4691 100644
--- a/tools/btsnoop.c
+++ b/tools/btsnoop.c
@@ -211,7 +211,7 @@ next_packet:
 		goto next_packet;
 	}
 
-	written = input_pkt[select_input].size = htobe32(toread - 1);
+	input_pkt[select_input].size = htobe32(toread - 1);
 	written = input_pkt[select_input].len = htobe32(toread - 1);
 
 	switch (buf[0]) {
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-09-15  6:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-10  6:35 [PATCH 1/2] tools/btsnoop : Fix variable reassigning issue gowtham babu
2014-09-12 16:51 ` Johan Hedberg
2014-09-15  6:15   ` Gowtham Anandha Babu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox