Skip to content

Commit b537693

Browse files
committed
use array length instead of last item index
1 parent 45a4cc6 commit b537693

File tree

1 file changed

+1
-1
lines changed
  • ncm-spma/src/main/perl/spma

1 file changed

+1
-1
lines changed

ncm-spma/src/main/perl/spma/yum.pm

+1-1
Original file line numberDiff line numberDiff line change
@@ -907,7 +907,7 @@ sub update_pkgs
907907
$to_rm = $self->packages_to_remove($wanted);
908908
defined($to_rm) or return 0;
909909
$self->spare_dependencies($to_rm, $to_install, $error_is_warn);
910-
if($#$to_rm > 0){
910+
if (scalar(@$to_rm) > 0) {
911911
$tx = $self->schedule(REMOVE, $to_rm);
912912
}
913913
}

0 commit comments

Comments
 (0)