Skip to content
Snippets Groups Projects
Commit 832c1c16 authored by Danny Auble's avatar Danny Auble
Browse files

Fix seff to handle NULL variables.

parent 5a5347c7
No related branches found
No related tags found
No related merge requests found
...@@ -219,5 +219,6 @@ sub kbytes2str { ...@@ -219,5 +219,6 @@ sub kbytes2str {
my $exp = int(log($kbytes) / log($mul)); my $exp = int(log($kbytes) / log($mul));
my @pre = qw/ M G T P E /; my @pre = qw/ M G T P E /;
my $pre = $pre[$exp-1]; my $pre = $pre[$exp-1];
return sprintf("%.2f %sB", ($kbytes / pow($mul, $exp)), $pre);
return sprintf("%.2f %sB", ($kbytes / pow($mul, $exp)), $pre ? $pre : "");
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment