Remove unnecessary casts from cli-cmds.c
authorTom Tromey <tom@tromey.com>
Wed, 5 Sep 2018 06:00:31 +0000 (00:00 -0600)
committerTom Tromey <tom@tromey.com>
Wed, 5 Sep 2018 15:23:22 +0000 (09:23 -0600)
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.

gdb/ChangeLog
gdb/cli/cli-cmds.c

index 0f8599bb1663ce923f8130addcf42be302ed536c..084765d29c167f935443965f00cb340290fba518 100644 (file)
@@ -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
index 4694553b7ddf8e37dc1834e9bbcd6f7a14549bbd..c60e5efd0cc84c3b1c162710cb079e811e1368ee 100644 (file)
@@ -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);
 
This page took 0.032465 seconds and 4 git commands to generate.