Skip to content

Commit

Permalink
Make luacheck >= 0.26 happy (#1489)
Browse files Browse the repository at this point in the history
Re: #1487
  • Loading branch information
NiLuJe committed Jun 8, 2022
1 parent 6baaab4 commit 0a33450
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ffi/SDL2_0.lua
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ local function handleJoyAxisMotionEvent(event)

local axis = axis_ev.axis

if not ( since_last_ev > min_time_since_last_ev ) then return end
if since_last_ev <= min_time_since_last_ev then return end

-- left stick 0/1
if axis == 0 then
Expand Down
2 changes: 1 addition & 1 deletion ffi/mupdf.lua
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ function mupdf.openDocument(filename)
setmetatable(mupdf_doc, document_mt)
if not (mupdf_doc:getPages() > 0) then
if mupdf_doc:getPages() <= 0 then
merror("MuPDF found no pages in file.")
end
Expand Down
4 changes: 2 additions & 2 deletions ffi/rtc.lua
Original file line number Diff line number Diff line change
Expand Up @@ -256,11 +256,11 @@ function RTC:validateWakeupAlarmByProximity(task_alarm, proximity)
end
-- If our stored alarm and the system alarm don't match, we didn't set it.
if not (alarm == alarm_sys) then return end
if alarm ~= alarm_sys then return end
-- If our stored alarm and the provided task alarm don't match,
-- we're not talking about the same task. This should never happen.
if task_alarm and not (alarm == task_alarm) then return end
if task_alarm and alarm ~= task_alarm then return end
local diff = now - alarm
if diff >= 0 and diff < proximity then return true end
Expand Down

0 comments on commit 0a33450

Please sign in to comment.