TT#69200 Switch to an early return in arrayeq() to reduce nesting level

Change-Id: I04ea1a4c9007ba1ebb6c0ecfbd2b716a53a7475f
(cherry picked from commit 64d4ec32ad)
mr7.5.5
Guillem Jover 6 years ago committed by Rene Krenn
parent cbfdf12c76
commit c866ac822f

@ -141,9 +141,8 @@ sub arrayeq {
my $ubound1 = _array_last($array_ptr1) // -1;
my $ubound2 = _array_last($array_ptr2) // -1;
if ($ubound1 != $ubound2) {
return 0;
} else {
return 0 if $ubound1 != $ubound2;
if ($case_insensitive) {
for (my $i = 0; $i <= $ubound1; $i += 1) {
if (lc($array_ptr1->[$i]) ne lc($array_ptr2->[$i])) {
@ -157,7 +156,6 @@ sub arrayeq {
}
}
}
}
return 1;

Loading…
Cancel
Save