cpu: simplified table initialization

This commit is contained in:
Adrian C. (anrxc) 2009-12-15 02:41:17 +01:00
parent 9150063670
commit 9b5efc714b
1 changed files with 2 additions and 6 deletions

View File

@ -45,13 +45,9 @@ local function worker(format)
-- Ensure tables are initialized correctly
while #cpu_total < #cpu_lines do
table.insert(cpu_total, 0)
end
while #cpu_active < #cpu_lines do
table.insert(cpu_total, 0)
table.insert(cpu_active, 0)
end
while #cpu_usage < #cpu_lines do
table.insert(cpu_usage, 0)
table.insert(cpu_usage, 0)
end
local total_new = {}