From 94f5bd23b9ab965644dd60419db14935a1931178 Mon Sep 17 00:00:00 2001 From: Jan-Tarek Butt Date: Wed, 19 Aug 2020 14:19:08 +0200 Subject: [PATCH] gluon-core: 200-wireless simplify if conditions Signed-off-by: Jan-Tarek Butt --- .../gluon-core/luasrc/lib/gluon/upgrade/200-wireless | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/package/gluon-core/luasrc/lib/gluon/upgrade/200-wireless b/package/gluon-core/luasrc/lib/gluon/upgrade/200-wireless index 1374e55c..9f1121f6 100755 --- a/package/gluon-core/luasrc/lib/gluon/upgrade/200-wireless +++ b/package/gluon-core/luasrc/lib/gluon/upgrade/200-wireless @@ -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