aboutsummaryrefslogtreecommitdiff
path: root/sboremove
diff options
context:
space:
mode:
authorAndreas Guldstrand <andreas.guldstrand@gmail.com>2016-05-02 15:40:52 +0200
committerAndreas Guldstrand <andreas.guldstrand@gmail.com>2016-05-02 15:40:52 +0200
commit276bd0ce2cb307fe8bb822308688837019cd4f4e (patch)
tree71c8951a3c7abec3b6e6ef2e530143cd39c62e37 /sboremove
parent594de5067ef8922f1125c948747490550a30a7d9 (diff)
downloadsbotools-276bd0ce2cb307fe8bb822308688837019cd4f4e.tar.xz
sboremove: change another loop to use in()
Diffstat (limited to 'sboremove')
-rwxr-xr-xsboremove6
1 files changed, 1 insertions, 5 deletions
diff --git a/sboremove b/sboremove
index 8c7b724..9506633 100755
--- a/sboremove
+++ b/sboremove
@@ -98,11 +98,7 @@ sub get_required_by {
my @dep_of;
if ( $required_by{$sbo} ) {
for my $req_by (@{$required_by{$sbo}}) {
- my $found = 0;
- for my $conf (@confirmed) {
- $found++ if $req_by eq $conf;
- }
- push @dep_of, $req_by unless $found;
+ push @dep_of, $req_by unless in($req_by => @confirmed);
}
}
return exists $dep_of[0] ? \@dep_of : undef;