aboutsummaryrefslogtreecommitdiff
path: root/gdb/cli/cli-interp.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/cli/cli-interp.c')
-rw-r--r--gdb/cli/cli-interp.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/gdb/cli/cli-interp.c b/gdb/cli/cli-interp.c
index 0663301..e12d45b 100644
--- a/gdb/cli/cli-interp.c
+++ b/gdb/cli/cli-interp.c
@@ -73,9 +73,7 @@ struct cli_suppress_notification cli_suppress_notification =
static struct cli_interp *
as_cli_interp (struct interp *interp)
{
- if (strcmp (interp_name (interp), INTERP_CONSOLE) == 0)
- return (struct cli_interp *) interp;
- return NULL;
+ return dynamic_cast<cli_interp *> (interp);
}
/* Longjmp-safe wrapper for "execute_command". */