aboutsummaryrefslogtreecommitdiff
path: root/SBO-Lib/lib
diff options
context:
space:
mode:
Diffstat (limited to 'SBO-Lib/lib')
-rw-r--r--SBO-Lib/lib/SBO/Lib.pm7
1 files changed, 3 insertions, 4 deletions
diff --git a/SBO-Lib/lib/SBO/Lib.pm b/SBO-Lib/lib/SBO/Lib.pm
index cec5f5f..3099c72 100644
--- a/SBO-Lib/lib/SBO/Lib.pm
+++ b/SBO-Lib/lib/SBO/Lib.pm
@@ -457,8 +457,8 @@ sub get_inst_names {
my %orig;
sub get_sbo_location {
- script_error('get_sbo_location requires an argument.') unless @_;
- my @sbos = ref $_[0] eq 'ARRAY' ? @{ $_[0] } : @_;
+ my @sbos = defined $_[0] && ref $_[0] eq 'ARRAY' ? @{ $_[0] } : @_;
+ script_error('get_sbo_location requires an argument.') unless @sbos;
# if we already have the location, return it now.
return $$store{$sbos[0]} if exists $$store{$sbos[0]};
@@ -467,9 +467,8 @@ sub get_sbo_location {
}
sub get_sbo_locations {
+ my @sbos = defined $_[0] && ref $_[0] eq 'ARRAY' ? @{ $_[0] } : @_;
script_error('get_sbo_locations requires an argument.') unless @_;
- my @sbos = @_;
- @sbos = @{ $sbos[0] } if ref $sbos[0] eq 'ARRAY';
my %locations;
my ($fh, $exit) = open_read($slackbuilds_txt);