mirror of
https://github.com/lm-sensors/lm-sensors
synced 2025-08-31 14:25:39 +00:00
Reindent auxiliary functions.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@5467 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
@@ -1710,12 +1710,12 @@ use vars qw(@cpu_ids);
|
||||
|
||||
# $_[0] is the sought value
|
||||
# @_[1..] is the list to seek in
|
||||
# Returns: 0 on failure, 1 if found.
|
||||
# Note: Every use of this sub probably indicates the use of the wrong
|
||||
# datastructure
|
||||
# Returns: 1 if found, 0 if not.
|
||||
sub contains
|
||||
{
|
||||
my $sought = shift;
|
||||
local $_;
|
||||
|
||||
foreach (@_) {
|
||||
return 1 if $sought eq $_;
|
||||
}
|
||||
@@ -1731,7 +1731,7 @@ sub valid_address
|
||||
print "$value is not a valid address, sorry.\n";
|
||||
exit -1;
|
||||
}
|
||||
$value = oct($value) if $value =~ /^0x/i;
|
||||
$value = oct($value) if $value =~ m/^0x/i;
|
||||
|
||||
return $value;
|
||||
}
|
||||
@@ -1742,6 +1742,7 @@ sub parse_not_to_scan
|
||||
my @ranges = split /\s*, \s*/, $to_parse;
|
||||
my @res;
|
||||
my $range;
|
||||
|
||||
foreach $range (@ranges) {
|
||||
my ($start, $end) = split /\s*-\s*/, $range;
|
||||
$start = valid_address($start);
|
||||
@@ -1758,6 +1759,7 @@ sub parse_not_to_scan
|
||||
push @res, $start if $start >= $min and $start <= $max;
|
||||
}
|
||||
}
|
||||
|
||||
return sort { $a <=> $b } @res;
|
||||
}
|
||||
|
||||
@@ -1769,6 +1771,7 @@ sub any_list_match
|
||||
{
|
||||
my ($list1, $list2) = @_;
|
||||
my ($el1, $el2);
|
||||
|
||||
foreach $el1 (@$list1) {
|
||||
foreach $el2 (@$list2) {
|
||||
return 1 if $el1 == $el2;
|
||||
|
Reference in New Issue
Block a user