mirror of
https://github.com/jerryscript-project/jerryscript.git
synced 2025-12-15 16:29:21 +00:00
Code simplification
Move the enclosed condition forward and combine the two if statements. JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
This commit is contained in:
parent
ed2a3602f4
commit
ed08518bd7
@ -418,16 +418,14 @@ ecma_op_array_object_define_own_property (ecma_object_t *obj_p, /**< the array o
|
||||
}
|
||||
|
||||
// e.
|
||||
if (index >= old_len_uint32)
|
||||
if (index < UINT32_MAX
|
||||
&& index >= old_len_uint32)
|
||||
{
|
||||
ecma_property_value_t *len_prop_value_p = ECMA_PROPERTY_VALUE_PTR (len_prop_p);
|
||||
|
||||
// i., ii.
|
||||
if (index < UINT32_MAX)
|
||||
{
|
||||
/* Setting the length property is always successful. */
|
||||
ecma_value_assign_uint32 (&len_prop_value_p->value, index + 1);
|
||||
}
|
||||
/* Setting the length property is always successful. */
|
||||
ecma_value_assign_uint32 (&len_prop_value_p->value, index + 1);
|
||||
}
|
||||
|
||||
// f.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user