diff options
| author | Mark Brown <broonie@kernel.org> | 2020-12-11 17:48:50 +0000 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2020-12-11 17:48:50 +0000 |
| commit | 58f7553fa424fd0fd74e8b796d50c66014cebebe (patch) | |
| tree | 8aecb1d047b1df2abbfa1ef323d2a724a6a61c77 /tools/lib/subcmd/help.c | |
| parent | Merge remote-tracking branch 'spi/for-5.9' into spi-linus (diff) | |
| parent | spi: Limit the spi device max speed to controller's max speed (diff) | |
| download | linux-58f7553fa424fd0fd74e8b796d50c66014cebebe.tar.gz linux-58f7553fa424fd0fd74e8b796d50c66014cebebe.zip | |
Merge remote-tracking branch 'spi/for-5.10' into spi-linus
Diffstat (limited to 'tools/lib/subcmd/help.c')
| -rw-r--r-- | tools/lib/subcmd/help.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tools/lib/subcmd/help.c b/tools/lib/subcmd/help.c index 2859f107abc8..bf02d62a3b2b 100644 --- a/tools/lib/subcmd/help.c +++ b/tools/lib/subcmd/help.c @@ -65,12 +65,14 @@ void exclude_cmds(struct cmdnames *cmds, struct cmdnames *excludes) ci = cj = ei = 0; while (ci < cmds->cnt && ei < excludes->cnt) { cmp = strcmp(cmds->names[ci]->name, excludes->names[ei]->name); - if (cmp < 0) + if (cmp < 0) { cmds->names[cj++] = cmds->names[ci++]; - else if (cmp == 0) - ci++, ei++; - else if (cmp > 0) + } else if (cmp == 0) { + ci++; ei++; + } else if (cmp > 0) { + ei++; + } } while (ci < cmds->cnt) |
