Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1543656 > unrolled thread
| Started by | Ozgur Karatas <okaratas@member.fsf.org> |
|---|---|
| First post | 2016-12-16 19:30 +0100 |
| Last post | 2016-12-16 20:40 +0100 |
| Articles | 7 — 4 participants |
Back to article view | Back to linux.kernel
[PATCH 1/1] tools: net: bpf_dbg.c fixed keyboard typo Ozgur Karatas <okaratas@member.fsf.org> - 2016-12-16 19:30 +0100
Re: [PATCH 1/1] tools: net: bpf_dbg.c fixed keyboard typo Joe Perches <joe@perches.com> - 2016-12-16 19:40 +0100
Re: [PATCH 1/1] tools: net: bpf_dbg.c fixed keyboard typo Ozgur Karatas <okaratas@member.fsf.org> - 2016-12-16 20:00 +0100
Re: [PATCH 1/1] tools: net: bpf_dbg.c fixed keyboard typo Ozgur Karatas <okaratas@member.fsf.org> - 2016-12-16 20:00 +0100
Re: [PATCH 1/1] tools: net: bpf_dbg.c fixed keyboard typo Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> - 2016-12-16 20:10 +0100
Re: [PATCH 1/1] tools: net: bpf_dbg.c fixed keyboard typo Ozgur Karatas <okaratas@member.fsf.org> - 2016-12-16 20:20 +0100
Re: [PATCH 1/1] tools: net: bpf_dbg.c fixed keyboard typo Daniel Borkmann <daniel@iogearbox.net> - 2016-12-16 20:40 +0100
| From | Ozgur Karatas <okaratas@member.fsf.org> |
|---|---|
| Date | 2016-12-16 19:30 +0100 |
| Subject | [PATCH 1/1] tools: net: bpf_dbg.c fixed keyboard typo |
| Message-ID | <sP5qy-7cn-11@gated-at.bofh.it> |
This patch fixed to keyboard typo, brackets not closed. I think, it should be close to parenthes. Signed-off-by: Ozgur Karatas <okaratas@member.fsf.org> --- tools/net/bpf_dbg.c | 2 +- 1 files changed, 1 insertion(+), 1 deletions(-) diff --git a/tools/net/bpf_dbg.c b/tools/net/bpf_dbg.c index 4f254bc..f715f46 100644 --- a/tools/net/bpf_dbg.c +++ b/tools/net/bpf_dbg.c @@ -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) -- 2.1.4
[toc] | [next] | [standalone]
| From | Joe Perches <joe@perches.com> |
|---|---|
| Date | 2016-12-16 19:40 +0100 |
| Message-ID | <sP5Ad-7fU-13@gated-at.bofh.it> |
| In reply to | #1543656 |
On Fri, 2016-12-16 at 20:21 +0200, Ozgur Karatas wrote: > 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.
[toc] | [prev] | [next] | [standalone]
| From | Ozgur Karatas <okaratas@member.fsf.org> |
|---|---|
| Date | 2016-12-16 20:00 +0100 |
| Message-ID | <sP5Tz-7mH-1@gated-at.bofh.it> |
| In reply to | #1543662 |
16.12.2016, 20:35, "Joe Perches" <joe@perches.com>: > On Fri, 2016-12-16 at 20:21 +0200, Ozgur Karatas wrote: >> 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
[toc] | [prev] | [next] | [standalone]
| From | Ozgur Karatas <okaratas@member.fsf.org> |
|---|---|
| Date | 2016-12-16 20:00 +0100 |
| Message-ID | <sP5Tz-7mH-23@gated-at.bofh.it> |
| In reply to | #1543662 |
16.12.2016, 20:35, "Joe Perches" <joe@perches.com>:
> On Fri, 2016-12-16 at 20:21 +0200, Ozgur Karatas wrote:
>> 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
[toc] | [prev] | [next] | [standalone]
| From | Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> |
|---|---|
| Date | 2016-12-16 20:10 +0100 |
| Message-ID | <sP63f-7FI-7@gated-at.bofh.it> |
| In reply to | #1543656 |
Hello.
On 12/16/2016 09:21 PM, Ozgur Karatas wrote:
> This patch fixed to keyboard typo, brackets not closed.
> I think, it should be close to parenthes.
>
> Signed-off-by: Ozgur Karatas <okaratas@member.fsf.org>
> ---
> tools/net/bpf_dbg.c | 2 +-
> 1 files changed, 1 insertion(+), 1 deletions(-)
>
> diff --git a/tools/net/bpf_dbg.c b/tools/net/bpf_dbg.c
> index 4f254bc..f715f46 100644
> --- a/tools/net/bpf_dbg.c
> +++ b/tools/net/bpf_dbg.c
> @@ -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? :-/
> (line = strtoul(line_string, NULL, 10)) < bpf_prog_len)
I think the code was correct before your patch...
> single_line = true;
> if (single_line)
MBR, Sergei
[toc] | [prev] | [next] | [standalone]
| From | Ozgur Karatas <okaratas@member.fsf.org> |
|---|---|
| Date | 2016-12-16 20:20 +0100 |
| Message-ID | <sP6cW-7Kg-15@gated-at.bofh.it> |
| In reply to | #1543696 |
16.12.2016, 21:08, "Sergei Shtylyov" <sergei.shtylyov@cogentembedded.com>: > Hello. Hi > On 12/16/2016 09:21 PM, Ozgur Karatas wrote: > >> This patch fixed to keyboard typo, brackets not closed. >> I think, it should be close to parenthes. >> >> Signed-off-by: Ozgur Karatas <okaratas@member.fsf.org> >> --- >> tools/net/bpf_dbg.c | 2 +- >> 1 files changed, 1 insertion(+), 1 deletions(-) >> >> diff --git a/tools/net/bpf_dbg.c b/tools/net/bpf_dbg.c >> index 4f254bc..f715f46 100644 >> --- a/tools/net/bpf_dbg.c >> +++ b/tools/net/bpf_dbg.c >> @@ -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? :-/ Yes, i compiled but I apologize if there was NAK. Also, checkpatch give a error. I could be wrong, will review again. Best Regards! >> (line = strtoul(line_string, NULL, 10)) < bpf_prog_len) > > I think the code was correct before your patch... > >> single_line = true; >> if (single_line) > > MBR, Sergei ~Ozgur
[toc] | [prev] | [next] | [standalone]
| From | Daniel Borkmann <daniel@iogearbox.net> |
|---|---|
| Date | 2016-12-16 20:40 +0100 |
| Message-ID | <sP6wi-7QE-27@gated-at.bofh.it> |
| In reply to | #1543656 |
On 12/16/2016 07:21 PM, Ozgur Karatas wrote: > > This patch fixed to keyboard typo, brackets not closed. > I think, it should be close to parenthes. > > Signed-off-by: Ozgur Karatas <okaratas@member.fsf.org> NAK for obvious reasons ... > --- > tools/net/bpf_dbg.c | 2 +- > 1 files changed, 1 insertion(+), 1 deletions(-) > > diff --git a/tools/net/bpf_dbg.c b/tools/net/bpf_dbg.c > index 4f254bc..f715f46 100644 > --- a/tools/net/bpf_dbg.c > +++ b/tools/net/bpf_dbg.c > @@ -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) >
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web