gdb: Remove extra if statement
authorAri Hannula <ari.hannula@intel.com>
Mon, 16 May 2022 11:43:31 +0000 (13:43 +0200)
committerChristina Schimpe <christina.schimpe@intel.com>
Fri, 31 Mar 2023 11:49:21 +0000 (13:49 +0200)
The removed if statement is already checked in the parent if else
statement.

Co-Authored-By: Christina Schimpe <christina.schimpe@intel.com>
gdb/thread.c

index 3d4cba32303d066501b5738d62923754a14c6625..25d97cd607273bbac66b549312daec579fc7e495 100644 (file)
@@ -1083,16 +1083,13 @@ print_thread_info_1 (struct ui_out *uiout, const char *requested_threads,
                                      global_ids, pid, tp))
              continue;
 
-           if (!uiout->is_mi_like_p ())
-             {
-               /* Switch inferiors so we're looking at the right
-                  target stack.  */
-               switch_to_inferior_no_thread (tp->inf);
-
-               target_id_col_width
-                 = std::max (target_id_col_width,
-                             thread_target_id_str (tp).size ());
-             }
+           /* Switch inferiors so we're looking at the right
+              target stack.  */
+           switch_to_inferior_no_thread (tp->inf);
+
+           target_id_col_width
+             = std::max (target_id_col_width,
+                         thread_target_id_str (tp).size ());
 
            ++n_threads;
          }