Skip to content

Commit

Permalink
Remove unused variables from c.lua
Browse files Browse the repository at this point in the history
  • Loading branch information
Katerina Barone-Adesi committed May 26, 2016
1 parent 214550a commit ee67430
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions syscall/linux/c.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,8 @@ Note a fair number are being deprecated, see include/uapi/asm-generic/unistd.h u
Some of these we already don't use, but some we do, eg use open not openat etc.
]]

local require, error, assert, tonumber, tostring,
setmetatable, pairs, ipairs, unpack, rawget, rawset,
pcall, type, table, string, select =
require, error, assert, tonumber, tostring,
setmetatable, pairs, ipairs, unpack, rawget, rawset,
pcall, type, table, string, select
local require, tonumber, pcall, select =
require, tonumber, pcall, select

local abi = require "syscall.abi"

Expand All @@ -34,7 +30,6 @@ local uint, ulong = ffi.typeof("unsigned int"), ffi.typeof("unsigned long")

local h = require "syscall.helpers"
local err64 = h.err64
local errpointer = h.errpointer

local i6432, u6432 = bit.i6432, bit.u6432

Expand All @@ -53,7 +48,6 @@ else
arg64u = function(val) return u6432(val) end
end
-- _llseek very odd, preadv
local function llarg64u(val) return u6432(val) end
local function llarg64(val) return i6432(val) end

local C = {}
Expand All @@ -69,7 +63,6 @@ local u64 = ffi.typeof("uint64_t")
-- TODO could make these return errno here, also are these best casts?
local syscall_long = ffi.C.syscall -- returns long
local function syscall(...) return tonumber(syscall_long(...)) end -- int is default as most common
local function syscall_uint(...) return uint(syscall_long(...)) end
local function syscall_void(...) return void(syscall_long(...)) end
local function syscall_off(...) return u64(syscall_long(...)) end -- off_t

Expand Down

0 comments on commit ee67430

Please sign in to comment.