Drop unnecessary "*l" parameter to read()
This commit is contained in:
parent
525b98cf10
commit
418215d4a6
1 changed files with 10 additions and 10 deletions
20
c4mate
20
c4mate
|
@ -144,17 +144,17 @@ sed -n '
|
|||
|
||||
while true do
|
||||
local entry = {}
|
||||
local oldbalance = tonumber(pipe:read("*l"))
|
||||
local oldbalance = tonumber(pipe:read())
|
||||
if oldbalance == nil then break end
|
||||
entry.oldbalance = oldbalance
|
||||
entry.newbalance = tonumber(pipe:read("*l"))
|
||||
entry.parameter = tonumber(pipe:read("*l"))
|
||||
entry.method = pipe:read("*l")
|
||||
entry.newbalance = tonumber(pipe:read())
|
||||
entry.parameter = tonumber(pipe:read())
|
||||
entry.method = pipe:read()
|
||||
if entry.method == "buy" or entry.method == "recharge" then
|
||||
entry.name = utf8_decode(pipe:read("*l"))
|
||||
entry.name = utf8_decode(pipe:read())
|
||||
else
|
||||
-- set_balance, transferTo, transferFrom
|
||||
entry.reason = utf8_decode(pipe:read("*l"))
|
||||
entry.reason = utf8_decode(pipe:read())
|
||||
end
|
||||
table.insert(log, entry)
|
||||
end
|
||||
|
@ -172,7 +172,7 @@ sed -n '
|
|||
-- Convert timestamps to local time.
|
||||
local timestamps = io.popen("date -f "..datefile.." +'%_c'")
|
||||
for i = 1, #log do
|
||||
log[i].time = timestamps:read("*l")
|
||||
log[i].time = timestamps:read()
|
||||
end
|
||||
|
||||
-- Check date exit code.
|
||||
|
@ -249,10 +249,10 @@ sed -n --sandbox '
|
|||
|
||||
while true do
|
||||
local item = {}
|
||||
item.id = tonumber(pipe:read("*l"))
|
||||
item.id = tonumber(pipe:read())
|
||||
if item.id == nil then break end
|
||||
item.name = utf8_decode(pipe:read("*l"))
|
||||
item.price = tonumber(pipe:read("*l"))
|
||||
item.name = utf8_decode(pipe:read())
|
||||
item.price = tonumber(pipe:read())
|
||||
table.insert(roster, item)
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue