Code cleanup: Move print_command_1 expr variable scope
authorJan Kratochvil <jan.kratochvil@redhat.com>
Thu, 26 Mar 2015 17:44:38 +0000 (18:44 +0100)
committerJan Kratochvil <jan.kratochvil@redhat.com>
Thu, 26 Mar 2015 17:44:38 +0000 (18:44 +0100)
gdb/ChangeLog
2015-03-26  Jan Kratochvil  <jan.kratochvil@redhat.com>

Code cleanup.
* printcmd.c (print_command_1): Move expr variable scope.

gdb/ChangeLog
gdb/printcmd.c

index 55a83830e44ea078c8a0c0da0eaa797386dacdf6..94ef5c8c1f96d0524d1c49d225656d681b6752b8 100644 (file)
@@ -1,3 +1,8 @@
+2015-03-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+       Code cleanup.
+       * printcmd.c (print_command_1): Move expr variable scope.
+
 2015-03-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
 
        Code cleanup.
index deb501ae7cff7afe63a5df4730187fbc3203bf85..a1451f8ab2f60ef80de4d7c9b53223a924ffdae1 100644 (file)
@@ -946,7 +946,6 @@ validate_format (struct format_data fmt, const char *cmdname)
 static void
 print_command_1 (const char *exp, int voidprint)
 {
-  struct expression *expr;
   struct cleanup *old_chain = make_cleanup (null_cleanup, NULL);
   char format = 0;
   struct value *val;
@@ -969,6 +968,8 @@ print_command_1 (const char *exp, int voidprint)
 
   if (exp && *exp)
     {
+      struct expression *expr;
+
       expr = parse_expression (exp);
       make_cleanup (free_current_contents, &expr);
       val = evaluate_expression (expr);
This page took 0.029945 seconds and 4 git commands to generate.