base-files: use named variables in the wifi script

Use the already present but unused $cmd and $dev variables instead of
positional parameters in ubus_wifi_cmd() to improve readability.

Signed-off-by: Andre Heider <a.heider@gmail.com>
This commit is contained in:
Andre Heider 2022-11-02 08:49:35 +01:00 committed by Christian Marangi
parent 930e702d72
commit 8fbe7738b9
No known key found for this signature in database
GPG Key ID: AC001D09ADBFEAD7

View File

@ -17,8 +17,8 @@ ubus_wifi_cmd() {
local dev="$2"
json_init
[ -n "$2" ] && json_add_string device "$2"
ubus call network.wireless "$1" "$(json_dump)"
[ -n "$dev" ] && json_add_string device "$dev"
ubus call network.wireless "$cmd" "$(json_dump)"
}
find_net_config() {(