From patchwork Sat May 18 16:59:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 90409 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 86BD03858C31 for ; Sat, 18 May 2024 16:59:53 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from omta38.uswest2.a.cloudfilter.net (omta38.uswest2.a.cloudfilter.net [35.89.44.37]) by sourceware.org (Postfix) with ESMTPS id BE1043858D20 for ; Sat, 18 May 2024 16:59:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org BE1043858D20 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tromey.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tromey.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org BE1043858D20 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=35.89.44.37 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1716051573; cv=none; b=SL/c9EqDmG329LBTTYCQOf8VK11NVEmKpLo2m9jUtF1QCcX4vnHvnvjvZtpbcsRYGqt2aF/2Ur8ziOl2dPihGkkMws05XLXlbor0DPn0JJsDfdHdf0YBbVnKNme6Ld30vaS2ClUG4lgFdrUqceIUqzhixc50+cPrLRKBpfjFDbY= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1716051573; c=relaxed/simple; bh=xzYkeGekC1159dSQjo2V3uuEKLhhIPs9kOEi35ixJGY=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=uzLSrCgzsEb7Ca9nbjo4lwhTFqlHIEbcRZm/mbVqTVVfDth9idG6PlryQNb8Xcr0Kmj0fmVq94Lne/gRwdlOqmF1QO2MNXZhoLosZ5ykxbqFVveGyPO6n+x+y09hAMdaC3ALgR8WFMpNbNS3aC8s1XLZJvuPJSbiIheFk7VFSkg= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from eig-obgw-6008a.ext.cloudfilter.net ([10.0.30.227]) by cmsmtp with ESMTPS id 8HEAsAzA1SLKx8NP6sDREk; Sat, 18 May 2024 16:59:28 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id 8NP5slXZKhgwr8NP6sldbu; Sat, 18 May 2024 16:59:28 +0000 X-Authority-Analysis: v=2.4 cv=WsktM8fv c=1 sm=1 tr=0 ts=6648de70 a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=TpHVaj0NuXgA:10 a=Qbun_eYptAEA:10 a=VLD1QahEXsJ-ZEjVS-8A:9 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Transfer-Encoding:MIME-Version:Message-ID:Date:Subject: Cc:To:From:Sender:Reply-To:Content-Type:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=0KIhmYb1BvzBXAQGobCL7jM2YJnU4k84NkLkJb10gYw=; b=qUionGu/c8tIf8YhDCJsWxA2zK vmWLtsLKoW7vRFWggk2dAhePZgSwjDIx6msr/23y43W9LT2QlBE6u2JrSZftEPYs4wv9HrDwrkjjE ymcVnk1snBA7ErHq3iZ2GfQvN; Received: from 75-166-134-4.hlrn.qwest.net ([75.166.134.4]:46238 helo=localhost.localdomain) by box5379.bluehost.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96.2) (envelope-from ) id 1s8NP5-0001mt-1f; Sat, 18 May 2024 10:59:27 -0600 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [pushed] Remove unnecessary block from execute_fn_to_ui_file Date: Sat, 18 May 2024 10:59:19 -0600 Message-ID: <20240518165919.3854170-1-tom@tromey.com> X-Mailer: git-send-email 2.44.0 MIME-Version: 1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5379.bluehost.com X-AntiAbuse: Original Domain - sourceware.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 75.166.134.4 X-Source-L: No X-Exim-ID: 1s8NP5-0001mt-1f X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 75-166-134-4.hlrn.qwest.net (localhost.localdomain) [75.166.134.4]:46238 X-Source-Auth: tom+tromey.com X-Email-Count: 1 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfCGK9HEoBmgbTTmB3fXfzOuaQIzJU12/eTu116R4u8iMLGd3YzhpY0cJemvyCtaN+9HndLcaQSdl/LIGBDfKdlNP2KXke+Yc5smJGufkNUQMZ7Ow4eX9 FEelpCAqmoLu2yAd4WnOdua3Py4tr+mX0tq2IiqIT8YkKKP+mmvsX31o6PvEqYA6zl0uRaiv75jfJVCFhlLUm8j3T5mfttHh7Js= X-Spam-Status: No, score=-3020.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, JMQ_SPF_NEUTRAL, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, 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 X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org I noticed that execute_fn_to_ui_file has an extra, unnecessary block. This patch removes it. --- gdb/top.c | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/gdb/top.c b/gdb/top.c index b93ef0a69b5..b5a129f59fc 100644 --- a/gdb/top.c +++ b/gdb/top.c @@ -609,22 +609,20 @@ execute_fn_to_ui_file (struct ui_file *file, std::function fn) scoped_restore save_async = make_scoped_restore (¤t_ui->async, 0); - { - ui_out_redirect_pop redirect_popper (current_uiout, file); - - scoped_restore save_stdout - = make_scoped_restore (&gdb_stdout, file); - scoped_restore save_stderr - = make_scoped_restore (&gdb_stderr, file); - scoped_restore save_stdlog - = make_scoped_restore (&gdb_stdlog, file); - scoped_restore save_stdtarg - = make_scoped_restore (&gdb_stdtarg, file); - scoped_restore save_stdtargerr - = make_scoped_restore (&gdb_stdtargerr, file); - - fn (); - } + ui_out_redirect_pop redirect_popper (current_uiout, file); + + scoped_restore save_stdout + = make_scoped_restore (&gdb_stdout, file); + scoped_restore save_stderr + = make_scoped_restore (&gdb_stderr, file); + scoped_restore save_stdlog + = make_scoped_restore (&gdb_stdlog, file); + scoped_restore save_stdtarg + = make_scoped_restore (&gdb_stdtarg, file); + scoped_restore save_stdtargerr + = make_scoped_restore (&gdb_stdtargerr, file); + + fn (); } /* See top.h. */