[OpenWrt-Devel] [PATCH v2] brcm-wl: fix bash comparison error
Felix Fietkau
nbd at openwrt.org
Sat Aug 30 01:34:42 EDT 2014
On 2014-08-19 18:38, Álvaro Fernández Rojas wrote:
> Signed-off-by: Álvaro Fernández Rojas <noltari at gmail.com>
> ---
> v2: use string comparison.
>
> diff --git a/package/kernel/broadcom-wl/files/lib/wifi/broadcom.sh b/package/kernel/broadcom-wl/files/lib/wifi/broadcom.sh
> index 69e3132..c27a2a3 100644
> --- a/package/kernel/broadcom-wl/files/lib/wifi/broadcom.sh
> +++ b/package/kernel/broadcom-wl/files/lib/wifi/broadcom.sh
> @@ -209,7 +209,8 @@ enable_broadcom() {
> }
>
> local leddc=$(wlc ifname "$device" leddc)
> - [ "$leddc" -eq 0xffff ] || {
> + local leddc_off=$(printf 0xffff\n)
> + [ "$leddc" == "$leddc_off" ] || {
Why the useless extra variable and printf? You can just use $((0xffff))
- Felix
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list