From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by sourceware.org (Postfix) with ESMTPS id 5E87D38582BC for ; Thu, 30 Mar 2023 16:20:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5E87D38582BC Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1680193233; x=1711729233; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=/tB0fsrHe/+HlVMaku05aMh8rfIQSSuPphhDFcZOzMo=; b=Y6DQ8gtzVZzb5oTuA1an8+ivb0lh2TEzpCCUz2RnuOrWszRYZ8/4gRmr CfUACZFSiVDu4Qoxxz0yAEvozk2sNP/Zq3hnn0XY5bleqMLqA4PIjBblc 36krwYv8PeYodrfB47eS2HB9P0iWOS2F+18GRCtae/F6JM9TECEADyGhz TUzR+C5zgC4Ak37NwRpev0gAhuXhyMkAbBbF49OAgH5omVuSkqH1ALPSe 7p5H/6SgSuTxPGywKzj3DbEVTb2Zi/QUFPqb5u+aILpFs1vd7ph6KZaOs lE8OmQYNZcWb0zmUR4knzPPASbLTpTbbGv5wSvf9InkOgEo/srzzaBJeO Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10665"; a="339941769" X-IronPort-AV: E=Sophos;i="5.98,305,1673942400"; d="scan'208";a="339941769" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Mar 2023 09:20:32 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10665"; a="634969592" X-IronPort-AV: E=Sophos;i="5.98,305,1673942400"; d="scan'208";a="634969592" Received: from labpc2315.iul.intel.com (HELO localhost) ([172.28.50.57]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Mar 2023 09:20:31 -0700 From: Christina Schimpe To: gdb-patches@sourceware.org Cc: Christina Schimpe Subject: [PATCH 1/1] gdb: Remove extra if statement Date: Thu, 30 Mar 2023 18:20:08 +0200 Message-Id: <20230330162008.3126244-2-christina.schimpe@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230330162008.3126244-1-christina.schimpe@intel.com> References: <20230330162008.3126244-1-christina.schimpe@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-10.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: From: Ari Hannula The removed if statement is already checked in the parent if else statement. Co-Authored-By: Christina Schimpe --- gdb/thread.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/gdb/thread.c b/gdb/thread.c index 3d4cba32303..25d97cd6072 100644 --- a/gdb/thread.c +++ b/gdb/thread.c @@ -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; } -- 2.25.1 Intel Deutschland GmbH Registered Address: Am Campeon 10, 85579 Neubiberg, Germany Tel: +49 89 99 8853-0, www.intel.de Managing Directors: Christin Eisenschmid, Sharon Heck, Tiffany Doon Silva Chairperson of the Supervisory Board: Nicole Lau Registered Office: Munich Commercial Register: Amtsgericht Muenchen HRB 186928