gluon-client-bridge: simplify boolean expressions (#2031)

This commit is contained in:
Ruben Barkow-Kuder 2020-05-25 01:13:30 +02:00 committed by GitHub
parent 14ab51876e
commit 891bfc77ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -25,7 +25,7 @@ local function configure_ap(radio, index, config, radio_name)
local macaddr = util.get_wlan_mac(uci, radio, index, 1)
if not ap() or not ap.ssid() or not macaddr then
if not ap.ssid() or not macaddr then
return
end
@ -58,7 +58,7 @@ local function configure_owe(radio, index, config, radio_name)
local macaddr = util.get_wlan_mac(uci, radio, index, 3)
if not ap() or not ap.owe_ssid() or not macaddr then
if not ap.owe_ssid() or not macaddr then
return
end
@ -84,7 +84,7 @@ local function configure_owe_transition_mode(config, radio_name)
return
end
if not ap() or not ap.owe_transition_mode() then
if not ap.owe_transition_mode(false) then
return
end
@ -97,7 +97,7 @@ local function configure_owe_transition_mode(config, radio_name)
local macaddr_client = uci:get('wireless', name_client, 'macaddr')
local macaddr_owe = uci:get('wireless', name_owe, 'macaddr')
if not ssid_client or not ssid_owe or not macaddr_client or not macaddr_owe then
if not (ssid_client and ssid_owe and macaddr_client and macaddr_owe) then
return
end