mirror of
https://github.com/openocd-org/openocd.git
synced 2025-10-14 02:58:23 +08:00
rtos: linux: drop useless code
Since the initial code merged in 2012, the last case of the switch has a useless test on 'retval' that is not assigned in the case. Since 'retval' is initialized to ERROR_OK, the condition is always false. Drop the check on 'retval'. While there, drop the useless parenthesis around the 'case' and add the 'break' statement. Change-Id: I3f673b5e10f6b28a4a74881b8a06a71b58afb422 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/9036 Tested-by: jenkins
This commit is contained in:
@@ -1332,7 +1332,7 @@ static int linux_thread_packet(struct connection *connection, char const *packet
|
||||
retval = GDB_THREAD_PACKET_NOT_CONSUMED;
|
||||
break;
|
||||
case 'c':
|
||||
case 's': {
|
||||
case 's':
|
||||
if (linux_os->threads_lookup == 1) {
|
||||
ct = linux_os->current_threads;
|
||||
|
||||
@@ -1357,11 +1357,7 @@ static int linux_thread_packet(struct connection *connection, char const *packet
|
||||
LOG_INFO("threads_needs_update = 1");
|
||||
linux_os->threads_needs_update = 1;
|
||||
}
|
||||
}
|
||||
|
||||
/* if a packet handler returned an error, exit input loop */
|
||||
if (retval != ERROR_OK)
|
||||
return retval;
|
||||
break;
|
||||
}
|
||||
|
||||
return retval;
|
||||
|
Reference in New Issue
Block a user