OpenOCD: drop comparison with true/false

Fix checkpatch errors:

	ERROR:BOOL_COMPARISON: Using comparison to true/false is
	error prone

While there,
- drop useless parenthesis,
- drop unnecessary else after a return.

Change-Id: I1234737b3e65bd10df5e938d1c36f9abaf02d348
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8496
Reviewed-by: zapb <dev@zapb.de>
Tested-by: jenkins
This commit is contained in:
Antonio Borneo
2024-09-16 11:55:20 +02:00
parent 66006d83b9
commit 3ccf68cd0a
9 changed files with 44 additions and 46 deletions

View File

@@ -3042,7 +3042,7 @@ COMMAND_HANDLER(handle_reg_command)
for (i = 0, reg = cache->reg_list;
i < cache->num_regs;
i++, reg++, count++) {
if (reg->exist == false || reg->hidden)
if (!reg->exist || reg->hidden)
continue;
/* only print cached values if they are valid */
if (reg->valid) {