use static local variable for units

This commit is contained in:
HummyPkg 2017-09-03 22:02:14 +01:00
parent 61582251c7
commit b6eceebc26

View File

@ -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} {