* [PATCH v2 2/3] tools/btsnoop : Fix variable reassigning issue
@ 2014-09-15 6:10 Gowtham Anandha Babu
2014-09-15 6:10 ` [PATCH v2 3/3] tools/seq2bseq : Fix the same expression issue in if condition Gowtham Anandha Babu
2014-09-16 7:44 ` [PATCH v2 2/3] tools/btsnoop : Fix variable reassigning issue Johan Hedberg
0 siblings, 2 replies; 4+ messages in thread
From: Gowtham Anandha Babu @ 2014-09-15 6:10 UTC (permalink / raw)
To: linux-bluetooth
Cc: marcel, johan.hedberg, d.kasatkin, bharat.panda, cpgs,
Gowtham Anandha Babu
The Variable 'written' is reassigned a value before the old one has been used.
---
tools/btsnoop.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/tools/btsnoop.c b/tools/btsnoop.c
index 6ca62d2..1fdd391 100644
--- a/tools/btsnoop.c
+++ b/tools/btsnoop.c
@@ -211,8 +211,9 @@ next_packet:
goto next_packet;
}
- written = input_pkt[select_input].size = htobe32(toread - 1);
- written = input_pkt[select_input].len = htobe32(toread - 1);
+ written = htobe32(toread-1);
+ input_pkt[select_input].size = written;
+ input_pkt[select_input].len = written;
switch (buf[0]) {
case 0x01:
--
1.9.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH v2 3/3] tools/seq2bseq : Fix the same expression issue in if condition
2014-09-15 6:10 [PATCH v2 2/3] tools/btsnoop : Fix variable reassigning issue Gowtham Anandha Babu
@ 2014-09-15 6:10 ` Gowtham Anandha Babu
2014-09-16 7:44 ` Johan Hedberg
2014-09-16 7:44 ` [PATCH v2 2/3] tools/btsnoop : Fix variable reassigning issue Johan Hedberg
1 sibling, 1 reply; 4+ messages in thread
From: Gowtham Anandha Babu @ 2014-09-15 6:10 UTC (permalink / raw)
To: linux-bluetooth
Cc: marcel, johan.hedberg, d.kasatkin, bharat.panda, cpgs,
Gowtham Anandha Babu
Fix the usage of same expression on both sides of '||' in if
---
tools/seq2bseq.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/seq2bseq.c b/tools/seq2bseq.c
index 7657a57..23f6c9e 100644
--- a/tools/seq2bseq.c
+++ b/tools/seq2bseq.c
@@ -40,7 +40,7 @@ static int convert_line(int fd, const char *line)
char str[3];
unsigned char val;
- if (line[0] == '*' || line[0] == '\r' || line[0] == '\r')
+ if (line[0] == '*' || line[0] == '\r' || line[0] == '\n')
return 0;
while (1) {
--
1.9.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2 2/3] tools/btsnoop : Fix variable reassigning issue
2014-09-15 6:10 [PATCH v2 2/3] tools/btsnoop : Fix variable reassigning issue Gowtham Anandha Babu
2014-09-15 6:10 ` [PATCH v2 3/3] tools/seq2bseq : Fix the same expression issue in if condition Gowtham Anandha Babu
@ 2014-09-16 7:44 ` Johan Hedberg
1 sibling, 0 replies; 4+ messages in thread
From: Johan Hedberg @ 2014-09-16 7:44 UTC (permalink / raw)
To: Gowtham Anandha Babu
Cc: linux-bluetooth, marcel, d.kasatkin, bharat.panda, cpgs
Hi Gowtham,
On Mon, Sep 15, 2014, Gowtham Anandha Babu wrote:
> The Variable 'written' is reassigned a value before the old one has been used.
> ---
> tools/btsnoop.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
Applied. Thanks.
Johan
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2 3/3] tools/seq2bseq : Fix the same expression issue in if condition
2014-09-15 6:10 ` [PATCH v2 3/3] tools/seq2bseq : Fix the same expression issue in if condition Gowtham Anandha Babu
@ 2014-09-16 7:44 ` Johan Hedberg
0 siblings, 0 replies; 4+ messages in thread
From: Johan Hedberg @ 2014-09-16 7:44 UTC (permalink / raw)
To: Gowtham Anandha Babu
Cc: linux-bluetooth, marcel, d.kasatkin, bharat.panda, cpgs
Hi Gowtham,
On Mon, Sep 15, 2014, Gowtham Anandha Babu wrote:
> Fix the usage of same expression on both sides of '||' in if
> ---
> tools/seq2bseq.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Applied. Thanks.
Johan
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-09-16 7:44 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-15 6:10 [PATCH v2 2/3] tools/btsnoop : Fix variable reassigning issue Gowtham Anandha Babu
2014-09-15 6:10 ` [PATCH v2 3/3] tools/seq2bseq : Fix the same expression issue in if condition Gowtham Anandha Babu
2014-09-16 7:44 ` Johan Hedberg
2014-09-16 7:44 ` [PATCH v2 2/3] tools/btsnoop : Fix variable reassigning issue Johan Hedberg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).