gluonc-core: 200-wireless: remove unneeded nil checks for uci:set_list()

uci:set_list() will delete the list when nil is passed, so there is no need
to differentiate between the cases.
This commit is contained in:
Matthias Schiffer 2017-08-08 04:09:29 +02:00
parent 06d0c0f211
commit 31721a61f5
No known key found for this signature in database
GPG Key ID: 16EF3F64CB201D9C
1 changed files with 2 additions and 11 deletions

View File

@ -151,17 +151,8 @@ local function configure_radio(radio, index, config)
uci:set('wireless', radio, 'htmode', 'HT20')
uci:set('wireless', radio, 'country', site.regdom)
if config.supported_rates then
uci:set_list('wireless', radio, 'supported_rates', config.supported_rates)
else
uci:delete('wireless', radio, 'supported_rates')
end
if config.basic_rate then
uci:set_list('wireless', radio, 'basic_rate', config.basic_rate)
else
uci:delete('wireless', radio, 'basic_rate')
end
uci:set_list('wireless', radio, 'supported_rates', config.supported_rates)
uci:set_list('wireless', radio, 'basic_rate', config.basic_rate)
local ibss_disabled = is_disabled('ibss_' .. radio)