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