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:
@@ -254,7 +254,7 @@ static int hwthread_get_thread_reg_list(struct rtos *rtos, int64_t thread_id,
|
||||
|
||||
int j = 0;
|
||||
for (int i = 0; i < reg_list_size; i++) {
|
||||
if (!reg_list[i] || reg_list[i]->exist == false || reg_list[i]->hidden)
|
||||
if (!reg_list[i] || !reg_list[i]->exist || reg_list[i]->hidden)
|
||||
continue;
|
||||
j++;
|
||||
}
|
||||
@@ -267,7 +267,7 @@ static int hwthread_get_thread_reg_list(struct rtos *rtos, int64_t thread_id,
|
||||
|
||||
j = 0;
|
||||
for (int i = 0; i < reg_list_size; i++) {
|
||||
if (!reg_list[i] || reg_list[i]->exist == false || reg_list[i]->hidden)
|
||||
if (!reg_list[i] || !reg_list[i]->exist || reg_list[i]->hidden)
|
||||
continue;
|
||||
if (!reg_list[i]->valid) {
|
||||
retval = reg_list[i]->type->get(reg_list[i]);
|
||||
|
||||
@@ -389,7 +389,7 @@ int rtos_thread_packet(struct connection *connection, char const *packet, int pa
|
||||
return ERROR_OK;
|
||||
} else if (strncmp(packet, "qSymbol", 7) == 0) {
|
||||
if (rtos_qsymbol(connection, packet, packet_size) == 1) {
|
||||
if (target->rtos_auto_detect == true) {
|
||||
if (target->rtos_auto_detect) {
|
||||
target->rtos_auto_detect = false;
|
||||
target->rtos->type->create(target);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user