Skip to content
Browse files

A few more uninit wornings cleaned up

  • Loading branch information...
1 parent 49957e3 commit bd0cc6bff4da0ceb437bc7ffa73870d2957c9f24 @afresh1 committed Oct 14, 2012
Showing with 4 additions and 0 deletions.
  1. +4 −0 OpenBSDtracker
View
4 OpenBSDtracker
@@ -17,6 +17,8 @@ helper title_case => sub {
helper human_number => sub {
my ($self, $number) = @_;
+ $number //= 0;
+
my @multipliers = qw( Bytes KiB MiB GiB TiB );
my $multiplier = 0;
while ($number > 1024) {
@@ -46,6 +48,8 @@ helper torrents => sub {
for grep { $torrents->{ lc $_ } || $files->{$_}->{complete} }
keys %{ $files || {} };
+ $torrents->{$_}->{torrent} ||= '' for keys %{ $torrents };
+
return $torrents;
};

0 comments on commit bd0cc6b

Please sign in to comment.
Something went wrong with that request. Please try again.