From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18565 invoked by alias); 3 Jan 2017 16:17:14 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 18526 invoked by uid 89); 3 Jan 2017 16:17:12 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.2 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_SOFTFAIL autolearn=no version=3.3.2 spammy=Hx-languages-length:1392 X-HELO: simark.ca Received: from simark.ca (HELO simark.ca) (158.69.221.121) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 03 Jan 2017 16:17:10 +0000 Received: by simark.ca (Postfix, from userid 33) id 3A8751E80F; Tue, 3 Jan 2017 11:17:08 -0500 (EST) To: Luis Machado Subject: Re: [PATCH] Change return type of ui_out redirect to void X-PHP-Originating-Script: 33:rcube.php MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Tue, 03 Jan 2017 16:17:00 -0000 From: Simon Marchi Cc: Simon Marchi , gdb-patches@sourceware.org In-Reply-To: <81609b60-0821-3f1b-7613-5bf691727d5f@codesourcery.com> References: <20161222220728.15146-1-simon.marchi@ericsson.com> <81609b60-0821-3f1b-7613-5bf691727d5f@codesourcery.com> Message-ID: <4270f5e03af2b1e554fc4ddaf1a0a8c7@polymtl.ca> X-Sender: simon.marchi@polymtl.ca User-Agent: Roundcube Webmail/1.2.3 X-IsSubscribed: yes X-SW-Source: 2017-01/txt/msg00016.txt.bz2 On 2016-12-23 14:44, Luis Machado wrote: > On 12/22/2016 04:07 PM, Simon Marchi wrote: >> diff --git a/gdb/cli/cli-logging.c b/gdb/cli/cli-logging.c >> index 46c23064fc..02e2705310 100644 >> --- a/gdb/cli/cli-logging.c >> +++ b/gdb/cli/cli-logging.c >> @@ -130,13 +130,11 @@ set_logging_redirect (char *args, int from_tty, >> struct cmd_list_element *c) >> >> /* There is a former output pushed on the ui_out_redirect stack. >> We >> want to replace it by OUTPUT so we must pop the former value >> - first. We should either do both the pop and push or to do >> - neither of it. At least do not try to push OUTPUT if the pop >> - already failed. */ >> + first. Ideally, we should either do both the pop and push or to >> do >> + neither of it. */ > > This comment reads funny. Maybe we should fix it while at it. > > "... we should either do both the pop and push or do neither of them. > "? Right, now that I re-read it, it does sound funny. Fixed locally to: /* There is a former output pushed on the ui_out_redirect stack. We want to replace it by OUTPUT so we must pop the former value - first. We should either do both the pop and push or to do - neither of it. At least do not try to push OUTPUT if the pop - already failed. */ + first. Ideally, we should either do both the pop and push or do + neither of them. */ Thanks!