diff options
author | J Pipkin <j@dawnrazor.net> | 2013-03-02 03:14:03 -0600 |
---|---|---|
committer | J Pipkin <j@dawnrazor.net> | 2013-03-02 03:14:03 -0600 |
commit | aa6de2e5a364f062df3eda6129f5e9285161af3a (patch) | |
tree | 8f2919019bf4b5d9ee05b13d48219a0824ba770c /SBO-Lib/lib/SBO/Lib.pm | |
parent | fb0d444d3aed4100546a55bdf69903aa13cc7fe5 (diff) | |
download | sbotools2-aa6de2e5a364f062df3eda6129f5e9285161af3a.tar.xz |
return 0 instead of undef from get_sbo_location, test return with if instead of with if defined
Diffstat (limited to 'SBO-Lib/lib/SBO/Lib.pm')
-rw-r--r-- | SBO-Lib/lib/SBO/Lib.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/SBO-Lib/lib/SBO/Lib.pm b/SBO-Lib/lib/SBO/Lib.pm index 9b9c168..770e300 100644 --- a/SBO-Lib/lib/SBO/Lib.pm +++ b/SBO-Lib/lib/SBO/Lib.pm @@ -326,7 +326,7 @@ sub get_sbo_location { seek $fh, 0, 0; } close $fh; - return keys %locations > 0 ? %locations : undef; + return %locations; } # pull the sbo name from a $location: $config{SBO_HOME}/system/wine, etc. @@ -383,7 +383,7 @@ sub get_available_updates() { FIRST: for my $key (keys @$pkg_list) { my $location = get_sbo_location($$pkg_list[$key]{name}); # if we can't find a location, assume invalid and skip - next FIRST unless defined $location; + next FIRST unless $location; my $version = get_sbo_version $location; if (versioncmp($version, $$pkg_list[$key]{version}) == 1) { push @updates, { |