mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-16 12:28:46 +00:00
Remove redundant variable from array_operation::evaluate
In array_operation::evaluate, 'idx' and 'tem' are redundant in one branch. This patch merges them, using the clearer name. Reviewed-by: John Baldwin <jhb@FreeBSD.org> Approved-By: Simon Marchi <simon.marchi@efficios.com>
This commit is contained in:
@@ -2464,14 +2464,13 @@ array_operation::evaluate (struct type *expect_type,
|
|||||||
if (!get_discrete_bounds (element_type, &low_bound, &high_bound))
|
if (!get_discrete_bounds (element_type, &low_bound, &high_bound))
|
||||||
error (_("(power)set type with unknown size"));
|
error (_("(power)set type with unknown size"));
|
||||||
memset (valaddr, '\0', type->length ());
|
memset (valaddr, '\0', type->length ());
|
||||||
int idx = 0;
|
for (int idx = 0; idx < nargs; idx++)
|
||||||
for (int tem = 0; tem < nargs; tem++)
|
|
||||||
{
|
{
|
||||||
LONGEST range_low, range_high;
|
LONGEST range_low, range_high;
|
||||||
struct type *range_low_type, *range_high_type;
|
struct type *range_low_type, *range_high_type;
|
||||||
struct value *elem_val;
|
struct value *elem_val;
|
||||||
|
|
||||||
elem_val = in_args[idx++]->evaluate (element_type, exp, noside);
|
elem_val = in_args[idx]->evaluate (element_type, exp, noside);
|
||||||
range_low_type = range_high_type = elem_val->type ();
|
range_low_type = range_high_type = elem_val->type ();
|
||||||
range_low = range_high = value_as_long (elem_val);
|
range_low = range_high = value_as_long (elem_val);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user