diff options
| author | Meng Tang <[email protected]> | 2022-03-15 15:48:51 +0800 |
|---|---|---|
| committer | Jakub Kicinski <[email protected]> | 2022-03-16 19:17:49 -0700 |
| commit | a8df216630fedadc4e8cc086f0e2e612f9c3d1f4 (patch) | |
| tree | 1c1f4320f9044fb7bcd3b3cfa863bcde8461b924 /tools/perf/scripts/python | |
| parent | e077ed58c243afc197bc2a2ba0e1ff61135e4ec2 (diff) | |
hamradio: Fix wrong assignment of 'bbc->cfg.loopback'
In file hamradio/baycom_epp.c, the baycom_setmode interface, there
is a problem with improper use of strstr.
Suppose that when modestr="noloopback", both conditions which are
'strstr(modestr,"noloopback")' and 'strstr(modestr,"loopback")'
will be true(not NULL), this lead the bc->cfg.loopback variable
will be first assigned to 0, and then reassigned to 1.
This will cause 'bc->cfg.loopback = 0' will never take effect. That
obviously violates the logic of the code, so adjust the order of
their execution to solve the problem.
Signed-off-by: Meng Tang <[email protected]>
Reviewed-by: Dan Carpenter <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions