make style

This commit is contained in:
Philippe Teuwen 2020-09-30 14:27:19 +02:00
commit c3c59e35cb
27 changed files with 1570 additions and 1590 deletions

View file

@ -30,10 +30,10 @@ device-side.
]]
local function calypso_parse(result)
local r = Command.parse(result)
local r = Command.parse(result)
if r.arg1 >= 0 then
local len = r.arg2 * 2
if len > 0 then
if len > 0 then
r.data = string.sub(r.data, 0, len);
return r, nil
end
@ -130,7 +130,7 @@ local function calypso_send_cmd_raw(data, ignoreresponse )
local count,cmd,arg0,arg1,arg2 = bin.unpack('LLLL', result)
if arg0 >= 0 then
return calypso_parse(result)
else
else
err = 'card response failed'
end
else
@ -254,7 +254,7 @@ function main(args)
if err then
print('<< '..err)
else
if result then
if result then
local status, desc, err = calypso_apdu_status(result.data)
local d = result.data:sub(3, (#result.data - 8))
if status then