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]

[Patch] Dead code in defaulted_query


Hi,

I believe there is a couple of lines of dead code
in defaulted_query().  Also, a minor error in a comment
in that method.

Is this right?

Marc

ChangeLog
2009-07-18  Marc Khouzam  <marc.khouzam@ericsson.com>

	* utils.c (defaulted_query): Update comment and remove
	dead code.

### Eclipse Workspace Patch 1.0
#P src
Index: gdb/utils.c
===================================================================
RCS file: /cvs/src/src/gdb/utils.c,v
retrieving revision 1.213
diff -u -r1.213 utils.c
--- gdb/utils.c	2 Jul 2009 17:21:07 -0000	1.213
+++ gdb/utils.c	19 Jul 2009 03:21:54 -0000
@@ -1433,7 +1433,7 @@
     return def_value;
 
   /* If input isn't coming from the user directly, just say what
-     question we're asking, and then answer "yes" automatically.  This
+     question we're asking, and then answer the default automatically.
This
      way, important error messages don't get lost when talking to GDB
      over a pipe.  */
   if (! input_from_terminal_p ())
@@ -1448,11 +1448,6 @@
       return def_value;
     }
 
-  /* Automatically answer the default value if input is not from the
user
-     directly, or if the user did not want prompts.  */
-  if (!input_from_terminal_p () || !caution)
-    return def_value;
-
   if (deprecated_query_hook)
     {
       return deprecated_query_hook (ctlstr, args);


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