This is the mail archive of the
gdb-cvs@sourceware.org
mailing list for the GDB project.
[binutils-gdb] Remove unnecessary casts from cli-cmds.c
- From: Tom Tromey <tromey at sourceware dot org>
- To: gdb-cvs at sourceware dot org
- Date: 5 Sep 2018 15:29:31 -0000
- Subject: [binutils-gdb] Remove unnecessary casts from cli-cmds.c
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=081bca4d622143b229cf02a1dda4afb9b457eefa
commit 081bca4d622143b229cf02a1dda4afb9b457eefa
Author: Tom Tromey <tom@tromey.com>
Date: Wed Sep 5 00:00:31 2018 -0600
Remove unnecessary casts from cli-cmds.c
I noticed a couple of unnecessary casts in cli-cmds.c. This patch
removes them.
Tested by rebuilding. I'm checking this in.
gdb/ChangeLog
2018-09-05 Tom Tromey <tom@tromey.com>
* cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
Diff:
---
gdb/ChangeLog | 4 ++++
gdb/cli/cli-cmds.c | 6 +++---
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 0f8599b..084765d 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,7 @@
+2018-09-05 Tom Tromey <tom@tromey.com>
+
+ * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
+
2018-09-05 Tom de Vries <tdevries@suse.de>
* dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
diff --git a/gdb/cli/cli-cmds.c b/gdb/cli/cli-cmds.c
index 4694553..c60e5ef 100644
--- a/gdb/cli/cli-cmds.c
+++ b/gdb/cli/cli-cmds.c
@@ -730,7 +730,7 @@ shell_escape (const char *arg, int from_tty)
close_most_fds ();
- if ((user_shell = (char *) getenv ("SHELL")) == NULL)
+ if ((user_shell = getenv ("SHELL")) == NULL)
user_shell = "/bin/sh";
/* Get the name of the shell for arg0. */
@@ -850,8 +850,8 @@ edit_command (const char *arg, int from_tty)
error (_("No line number known for %s."), arg);
}
- if ((editor = (char *) getenv ("EDITOR")) == NULL)
- editor = "/bin/ex";
+ if ((editor = getenv ("EDITOR")) == NULL)
+ editor = "/bin/ex";
fn = symtab_to_fullname (sal.symtab);