[LEDE-DEV] [PATCH] busybox: prevent globbing, splitting

Oswald Buddenhagen oswald.buddenhagen at gmx.de
Fri Oct 14 23:17:00 PDT 2016


On Fri, Oct 14, 2016 at 07:54:53PM +0200, Jan-Tarek Butt wrote:
> -	ntpservers=$(ubus call network.interface dump | jsonfilter -e "@.interface[$filter]['data']['ntpserver']")
> +	ntpservers="$(ubus call network.interface dump | jsonfilter -e "@.interface[$filter]['data']['ntpserver']")"
>  
this doesn't add anything but noise, as the RHS of an assignment is not
split or globbed.

> -		[ "$duplicate" = 0 ] && server="$server $ntpserver"
> +		[ "$duplicate" -eq "0" ] && server="$server $ntpserver"
>  
quoting literal numbers is just silly imo. _especially_ as you're
swithing to an operator that explicitly requires a number.




More information about the Lede-dev mailing list