This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Change return type of ui_out redirect to void
- From: Simon Marchi <simon dot marchi at polymtl dot ca>
- To: Luis Machado <lgustavo at codesourcery dot com>
- Cc: Simon Marchi <simon dot marchi at ericsson dot com>, gdb-patches at sourceware dot org
- Date: Tue, 03 Jan 2017 11:17:08 -0500
- Subject: Re: [PATCH] Change return type of ui_out redirect to void
- Authentication-results: sourceware.org; auth=none
- References: <20161222220728.15146-1-simon.marchi@ericsson.com> <81609b60-0821-3f1b-7613-5bf691727d5f@codesourcery.com>
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!