luci-base: network.js: simplify getWifiNetidBySid
Remove unused variables i and netid and reuse radioname Signed-off-by: Sergey Ponomarev <stokito@gmail.com>
This commit is contained in:
parent
f423025927
commit
d35dd2d489
1 changed files with 2 additions and 2 deletions
|
@ -210,8 +210,8 @@ function getWifiNetidBySid(sid) {
|
|||
var s = uci.get('wireless', sid);
|
||||
if (s != null && s['.type'] == 'wifi-iface') {
|
||||
var radioname = s.device;
|
||||
if (typeof(s.device) == 'string') {
|
||||
var i = 0, netid = null, sections = uci.sections('wireless', 'wifi-iface');
|
||||
if (typeof(radioname) == 'string') {
|
||||
var sections = uci.sections('wireless', 'wifi-iface');
|
||||
for (var i = 0, n = 0; i < sections.length; i++) {
|
||||
if (sections[i].device != s.device)
|
||||
continue;
|
||||
|
|
Loading…
Reference in a new issue