net: remove redudant string.match call

This commit is contained in:
Adrian C. (anrxc) 2010-03-12 04:21:11 +01:00
parent 1abb451d7a
commit dda51b1e34
1 changed files with 2 additions and 2 deletions

View File

@ -33,8 +33,8 @@ local function worker(format)
for line in f:lines() do
-- Match wmaster0 as well as rt0 (multiple leading spaces)
if string.match(line, "^[%s]?[%s]?[%s]?[%s]?[%w]+:") then
local name = string.match(line, "^[%s]?[%s]?[%s]?[%s]?([%w]+):")
local name = string.match(line, "^[%s]?[%s]?[%s]?[%s]?([%w]+):")
if name ~= nil then
-- Received bytes, first value after the name
local recv = tonumber(string.match(line, ":[%s]*([%d]+)"))
-- Transmited bytes, 7 fields from end of the line