Code cleanup: Move print_command_1 expr variable scope
gdb/ChangeLog 2015-03-26 Jan Kratochvil <jan.kratochvil@redhat.com> Code cleanup. * printcmd.c (print_command_1): Move expr variable scope.
This commit is contained in:
parent
8d89f51a70
commit
f30d5c78fa
2 changed files with 7 additions and 1 deletions
|
@ -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>
|
2015-03-26 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||||
|
|
||||||
Code cleanup.
|
Code cleanup.
|
||||||
|
|
|
@ -946,7 +946,6 @@ validate_format (struct format_data fmt, const char *cmdname)
|
||||||
static void
|
static void
|
||||||
print_command_1 (const char *exp, int voidprint)
|
print_command_1 (const char *exp, int voidprint)
|
||||||
{
|
{
|
||||||
struct expression *expr;
|
|
||||||
struct cleanup *old_chain = make_cleanup (null_cleanup, NULL);
|
struct cleanup *old_chain = make_cleanup (null_cleanup, NULL);
|
||||||
char format = 0;
|
char format = 0;
|
||||||
struct value *val;
|
struct value *val;
|
||||||
|
@ -969,6 +968,8 @@ print_command_1 (const char *exp, int voidprint)
|
||||||
|
|
||||||
if (exp && *exp)
|
if (exp && *exp)
|
||||||
{
|
{
|
||||||
|
struct expression *expr;
|
||||||
|
|
||||||
expr = parse_expression (exp);
|
expr = parse_expression (exp);
|
||||||
make_cleanup (free_current_contents, &expr);
|
make_cleanup (free_current_contents, &expr);
|
||||||
val = evaluate_expression (expr);
|
val = evaluate_expression (expr);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue