sbotools2

Maintenance fork of the original sbotools version 2
Log | Files | Refs | README

commit 6a674af346607cee9c2d371189c04e19c402adf0
parent bff15cefdd9ba452876dc5549db7ff674004efd4
Author: Andreas Guldstrand <andreas.guldstrand@gmail.com>
Date:   Mon,  2 May 2016 01:36:02 +0200

sboremove: rewrite confirm_remove() to use in()

Diffstat:
Msboremove | 6+-----
1 file changed, 1 insertion(+), 5 deletions(-)

diff --git 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; }