aboutsummaryrefslogtreecommitdiff
path: root/sboremove
diff options
context:
space:
mode:
authorAndreas Guldstrand <andreas.guldstrand@gmail.com>2016-05-02 01:36:02 +0200
committerAndreas Guldstrand <andreas.guldstrand@gmail.com>2016-05-02 01:36:02 +0200
commit6a674af346607cee9c2d371189c04e19c402adf0 (patch)
treedb4d15538a56f51bde1e747a326f581b8365ec1b /sboremove
parentbff15cefdd9ba452876dc5549db7ff674004efd4 (diff)
downloadsbotools-6a674af346607cee9c2d371189c04e19c402adf0.tar.xz
sboremove: rewrite confirm_remove() to use in()
Diffstat (limited to 'sboremove')
-rwxr-xr-xsboremove6
1 files changed, 1 insertions, 5 deletions
diff --git a/sboremove b/sboremove
index 9622bca..c04f1c8 100755
--- a/sboremove
+++ b/sboremove
@@ -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;
}