fix typo during interactive_mode check in gdb_has_a_terminal

Discovered by Pierre Muller.

gdb/ChangeLog:

        * inflow.c (gdb_has_a_terminal): Fix typo in interactive_mode
        value test.

gdb/testsuite/ChangeLog:

        * gdb.base/interact.exp: Add extra tests that verify that
        the value of the interactive-mode setting does not change
        after the script is sourced.
This commit is contained in:
Joel Brobecker 2011-01-31 03:11:40 +00:00
parent f4b54baf38
commit 6b0c4c1f05
4 changed files with 30 additions and 4 deletions

View file

@ -165,7 +165,7 @@ int
gdb_has_a_terminal (void)
{
if (interactive_mode != AUTO_BOOLEAN_AUTO)
return interactive_mode = AUTO_BOOLEAN_TRUE;
return interactive_mode == AUTO_BOOLEAN_TRUE;
switch (gdb_has_a_terminal_flag)
{