diff options
author | Andreas Guldstrand <andreas.guldstrand@gmail.com> | 2016-05-02 01:36:02 +0200 |
---|---|---|
committer | Andreas Guldstrand <andreas.guldstrand@gmail.com> | 2016-05-02 01:36:02 +0200 |
commit | 6a674af346607cee9c2d371189c04e19c402adf0 (patch) | |
tree | db4d15538a56f51bde1e747a326f581b8365ec1b /sboremove | |
parent | bff15cefdd9ba452876dc5549db7ff674004efd4 (diff) | |
download | sbotools-6a674af346607cee9c2d371189c04e19c402adf0.tar.xz |
sboremove: rewrite confirm_remove() to use in()
Diffstat (limited to 'sboremove')
-rwxr-xr-x | sboremove | 6 |
1 files changed, 1 insertions, 5 deletions
@@ -110,11 +110,7 @@ sub get_required_by { sub confirm_remove { my $sbo = shift; - my $found = 0; - for my $conf (@confirmed) { - $found++ if $sbo eq $conf; - } - push @confirmed, $sbo unless $found; + push @confirmed, $sbo unless in($sbo => @confirmed); return 1; } |