[Patch] Dead code in defaulted_query
Marc Khouzam
marc.khouzam@ericsson.com
Tue Jul 21 08:08:00 GMT 2009
> -----Original Message-----
> From: Tom Tromey [mailto:tromey@redhat.com]
> Sent: July-20-09 1:28 PM
> To: Marc Khouzam
> Cc: gdb-patches@sourceware.org
> Subject: Re: [Patch] Dead code in defaulted_query
>
> >>>>> "Marc" == Marc Khouzam <marc.khouzam@ericsson.com> writes:
>
> Marc> I believe there is a couple of lines of dead code
> Marc> in defaulted_query(). Also, a minor error in a comment
> Marc> in that method.
>
> Marc> Is this right?
>
> It looks right to me.
Thanks, I checked-in the below patch
ChangeLog
2009-07-20 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);
More information about the Gdb-patches
mailing list