This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Change return type of ui_out redirect to void


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!


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]