Skip to content
Snippets Groups Projects
Commit 94f5bd23 authored by Jan-Tarek Butt's avatar Jan-Tarek Butt
Browse files

gluon-core: 200-wireless simplify if conditions


Signed-off-by: default avatarJan-Tarek Butt <tarek@ring0.de>
parent 04b87dc1
No related branches found
No related tags found
No related merge requests found
......@@ -82,20 +82,20 @@ local function get_htmode(radio)
end
local function is_disabled(name)
if uci:get('wireless', name) then
return uci:get_bool('wireless', name, 'disabled')
else
if not uci:get('wireless', name) then
return nil
end
return uci:get_bool('wireless', name, 'disabled')
end
-- Returns the first argument that is not nil; don't call without any non-nil arguments!
local function first_non_nil(first, ...)
if first ~= nil then
return first
else
return first_non_nil(...)
end
return first_non_nil(...)
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment