From aa6de2e5a364f062df3eda6129f5e9285161af3a Mon Sep 17 00:00:00 2001 From: J Pipkin Date: Sat, 2 Mar 2013 03:14:03 -0600 Subject: return 0 instead of undef from get_sbo_location, test return with if instead of with if defined --- SBO-Lib/lib/SBO/Lib.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'SBO-Lib/lib/SBO/Lib.pm') 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, { -- cgit v1.2.3