[Tarantool-patches] [PATCH 5/6] Fix luacheck warnings in src/lua/

Vladislav Shpilevoy v.shpilevoy at tarantool.org
Sun Jul 5 19:28:25 MSK 2020


> diff --git a/src/lua/msgpackffi.lua b/src/lua/msgpackffi.lua
> index f01ffaef0..cb7ad5b88 100644
> --- a/src/lua/msgpackffi.lua
> +++ b/src/lua/msgpackffi.lua
> @@ -603,7 +599,7 @@ local function check_offset(offset, len)
>      if offset == nil then
>          return 1
>      end
> -    local offset = ffi.cast('ptrdiff_t', offset)
> +    offset = ffi.cast('ptrdiff_t', offset)

Unnecessary diff.

>      if offset < 1 or offset > len then
>          error(string.format("offset = %d is out of bounds [1..%d]",
>              tonumber(offset), len))


More information about the Tarantool-patches mailing list