tools: net: bpf_dbg.c fixed keyboard typo
Subsystems (2)
PATCH 1/1 tools: net: bpf_dbg.c fixed keyboard typo
This patch fixed to keyboard typo, brackets not closed. I think, it should be close to parenthes.
--- tools/net/bpf_dbg.c | 2 +- 1 files changed, 1 insertion(+), 1 deletions(-)
tools/net/bpf_dbg.c +1 -1
@@ -1213,7 +1213,7 @@ static int cmd_disassemble(char *line_string)if (!bpf_prog_loaded ())return CMD_ERR ; -if (strlen (line_string) >0 && + if (strlen(line_string) > 0 &&) (line =strtoul (line_string,NULL ,10 )) < bpf_prog_len) single_line = true;if (single_line)
Signature · 1 line
2.1.4
Quoted 2 lines · Ozgur Karatas
This patch fixed to keyboard typo, brackets not closed. I think, it should be close to parenthes.
No.
Please compile and test your patches on your own system before you send them.
16.12.2016, 20:35, "Joe Perches" <[email protected]>:
Quoted 8 lines · Ozgur Karatas
Quoted 2 lines
This patch fixed to keyboard typo, brackets not closed. I think, it should be close to parenthes.
No.
Please compile and test your patches on your own system before you send them.
Dear Perches,
I have already tested and it was not a part of the code anyway. if there is no parentheses, the code works incorrectly and give a error. I'm sorry, have a little problem with my english but "line_string" variables would not equal NULL, 10. So the code it skips it and runs to "bpf_prog_len". If it should be equal "0 &&" and already be completed (>) right?
if (strlen(line_string) > 0 &&
(line = strtoul(line_string, NULL, 10)) < bpf_prog_len)
Testing:
$ make M=tools/ tools//Makefile:6: scripts/Makefile.include: No such file or directory $ cp tools/scripts/Makefile.include scripts/Makefile $ make M=tools/ Building modules, stage 2. MODPOST 0 modules
I try to module (insmod) and worked.
Regards,
~Ozgur
16.12.2016, 20:35, "Joe Perches" <[email protected]>:
Quoted 8 lines · Ozgur Karatas
Quoted 2 lines
This patch fixed to keyboard typo, brackets not closed. I think, it should be close to parenthes.
No.
Please compile and test your patches on your own system before you send them.
Also, checkpatch script give a error, it should not forget.
$ ./scripts/checkpatch.pl --file --terse tools/net/bpf_dbg.c tools/net/bpf_dbg.c:1216: ERROR: do not use assignment in if condition
After fix:
$ ./scripts/checkpatch.pl --file --terse tools/net/bpf_dbg.c total: 0 errors, 6 warnings, 1395 lines checked
Regards,
~Ozgur
Hello.
Quoted 13 lines · Ozgur Karatas
This patch fixed to keyboard typo, brackets not closed. I think, it should be close to parenthes.
Signed-off-by Ozgur Karatas <[email protected]>--- tools/net/bpf_dbg.c | 2 +- 1 files changed, 1 insertion(+), 1 deletions(-)tools/net/bpf_dbg.c +0
-0
tools/net/bpf_dbg.c static int cmd_disassemble(char *line_string) · line 1216
Quoted 5 lines
tools/net/bpf_dbg.c +1
-1@@ -1213,7 +1213,7 @@ static int cmd_disassemble(char *line_string)if (!bpf_prog_loaded ())return CMD_ERR ; - if (strlen(line_string) > 0 && + if (strlen(line_string) > 0 &&)
Have tried to you compile that? :-/
tools/net/bpf_dbg.c static int cmd_disassemble(char *line_string) · line 1217
Quoted 1 line
tools/net/bpf_dbg.c +0
-0(line = strtoul(line_string, NULL, 10)) < bpf_prog_len)
I think the code was correct before your patch...
tools/net/bpf_dbg.c static int cmd_disassemble(char *line_string) · line 1219
Quoted 2 lines
tools/net/bpf_dbg.c +0
-0single_line = true;if (single_line)
MBR, Sergei
16.12.2016, 21:08, "Sergei Shtylyov" <[email protected]>:
Quoted 1 line
Hello.
Hi
Quoted 16 lines · Ozgur Karatas
Quoted 15 lines
This patch fixed to keyboard typo, brackets not closed. I think, it should be close to parenthes.
Signed-off-by Ozgur Karatas <[email protected]>---
tools/net/bpf_dbg.c | 2 +-1 files changed, 1 insertion(+), 1 deletions(-)diff --git
a/tools/net/bpf_dbg.cb/tools/net/bpf_dbg.cindex 4f254bc..f715f46 100644
---a/tools/net/bpf_dbg.c
+++b/tools/net/bpf_dbg.c
@@ -1213,7 +1213,7 @@ static intcmd_disassemble(char *line_string)
Quoted 6 lines
Quoted 4 lines
if (!bpf_prog_loaded())
returnCMD_ERR;
- if (strlen(line_string)> 0 &&
+ if (strlen(line_string)> 0 &&)Have tried to you compile that? :-/
Yes, i compiled but I apologize if there was NAK.
Also, checkpatch give a error.
I could be wrong, will review again.
Best Regards!
Quoted 8 lines
Quoted 1 line
(line =
strtoul(line_string, NULL, 10)) <bpf_prog_len)I think the code was correct before your patch...
Quoted 2 lines
single_line = true;
if (single_line)MBR, Sergei
~Ozgur
Quoted 5 lines · Ozgur Karatas
This patch fixed to keyboard typo, brackets not closed. I think, it should be close to parenthes.
Signed-off-by Ozgur Karatas <[email protected]>
NAK for obvious reasons ...
Quoted 18 lines
--- tools/net/bpf_dbg.c | 2 +- 1 files changed, 1 insertion(+), 1 deletions(-)tools/net/bpf_dbg.c +1
-1@@ -1213,7 +1213,7 @@ static int cmd_disassemble(char *line_string)if (!bpf_prog_loaded ())return CMD_ERR ; -if (strlen (line_string) >0 && + if (strlen(line_string) > 0 &&) (line =strtoul (line_string,NULL ,10 )) < bpf_prog_len) single_line = true;if (single_line)