diff options
author | Andreas Guldstrand <andreas.guldstrand@gmail.com> | 2016-05-02 15:40:52 +0200 |
---|---|---|
committer | Andreas Guldstrand <andreas.guldstrand@gmail.com> | 2016-05-02 15:40:52 +0200 |
commit | 276bd0ce2cb307fe8bb822308688837019cd4f4e (patch) | |
tree | 71c8951a3c7abec3b6e6ef2e530143cd39c62e37 /sboremove | |
parent | 594de5067ef8922f1125c948747490550a30a7d9 (diff) | |
download | sbotools-276bd0ce2cb307fe8bb822308688837019cd4f4e.tar.xz |
sboremove: change another loop to use in()
Diffstat (limited to 'sboremove')
-rwxr-xr-x | sboremove | 6 |
1 files changed, 1 insertions, 5 deletions
@@ -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; |