From b6eceebc269582fd73debb7baaaa91516df0fadc Mon Sep 17 00:00:00 2001 From: HummyPkg Date: Sun, 3 Sep 2017 22:02:14 +0100 Subject: [PATCH] use static local variable for units --- webif/lib/pretty_size | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/webif/lib/pretty_size b/webif/lib/pretty_size index 4f4f02c8..09c45722 100644 --- a/webif/lib/pretty_size +++ b/webif/lib/pretty_size @@ -1,7 +1,6 @@ if {![exists -proc pretty_size]} { - proc pretty_size {size} { - set units {bytes KiB MiB GiB TiB} + proc pretty_size {size} {{units {bytes KiB MiB GiB TiB}}} { # for {set i 0; set l [llength $units]; incr l -1} { # $size > 1023 && $i < $l} {incr i} {