From: Andrea Claudi <hidden> Date: 2021-08-07 17:00:39
The value of s used inside the cycle is the result of strstr(), so this
assignment is useless.
Signed-off-by: Andrea Claudi <redacted>
---
lib/bpf_glue.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
From: Andrea Claudi <hidden> Date: 2021-08-12 09:01:56
On Wed, Aug 11, 2021 at 09:08:15AM -0700, Stephen Hemminger wrote:
It is bad style in C to do assignment in a conditional.
It causes errors, and is not anymore efficient.
I agree with you.
There is a large number of similar assignments in other parts of the
code; I can work on a treewide patch to address them all, if you think
it's a good idea.
From: Stephen Hemminger <stephen@networkplumber.org> Date: 2021-08-12 16:27:02
On Thu, 12 Aug 2021 11:01:42 +0200
Andrea Claudi [off-list ref] wrote:
On Wed, Aug 11, 2021 at 09:08:15AM -0700, Stephen Hemminger wrote:
quoted
It is bad style in C to do assignment in a conditional.
It causes errors, and is not anymore efficient.
I agree with you.
There is a large number of similar assignments in other parts of the
code; I can work on a treewide patch to address them all, if you think
it's a good idea.
I am looking into this, checkpatch seems to find them