tools: Avoid comma separated statements

Use semicolons and braces.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
This commit is contained in:
Joe Perches
2020-08-24 21:56:26 -07:00
committed by Shuah Khan
parent c8bd596f93
commit aa803771a8
4 changed files with 210 additions and 128 deletions

View File

@@ -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)