[LEDE-DEV] [PATCH v3 04/13] scripts: $/${} is unnecessary on arithmetic variables

2016-10-06 Thread Jan-Tarek Butt
Signed-off-by: Jan-Tarek Butt --- scripts/om-fwupgradecfg-gen.sh | 10 +- scripts/ubinize-image.sh | 10 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/scripts/om-fwupgradecfg-gen.sh b/scripts/om-fwupgradecfg-gen.sh index 93f6794..5cbb8d1 100644 --- a/sc

Re: [LEDE-DEV] [PATCH v3 04/13] scripts: $/${} is unnecessary on arithmetic variables

2016-10-06 Thread Sebastian Moeller
Hi Jan-Tarek, It might be not be necessary, but does it hurt? Are you concerned that the current practice will hide variables changing their "type" from arithmetic and that removing the $ prefix will silence this instead of giving an error message? Or does this change improve run time of the sc

Re: [LEDE-DEV] [PATCH v3 04/13] scripts: $/${} is unnecessary on arithmetic variables

2016-10-06 Thread Bastian Bittorf
* Sebastian Moeller [06.10.2016 13:48]: > It might be not be necessary, but does it hurt? Are you concerned that the > current practice will hide variables changing their "type" from arithmetic > and that removing the $ prefix will silence this instead of giving an error > message? Or does this

Re: [LEDE-DEV] [PATCH v3 04/13] scripts: $/${} is unnecessary on arithmetic variables

2016-10-06 Thread Sebastian Moeller
Hi Bastian, On October 6, 2016 2:09:01 PM GMT+02:00, Bastian Bittorf wrote: >* Sebastian Moeller [06.10.2016 13:48]: >> It might be not be necessary, but does it hurt? Are you concerned >that the current practice will hide variables changing their "type" >from arithmetic and that removing the $

Re: [LEDE-DEV] [PATCH v3 04/13] scripts: $/${} is unnecessary on arithmetic variables

2016-10-06 Thread Jo-Philipp Wich
Hi, removing the dollar signs lets expressions succeed which would otherwise fail - which means it introduces a behavior change. root@jj:~# ash -c 'echo $((undef1 + undef2))' 0 root@jj:~# ash -c 'echo $(($undef1 + $undef2))' ash: arithmetic syntax error root@jj:~# ~ Jo _

Re: [LEDE-DEV] [PATCH v3 04/13] scripts: $/${} is unnecessary on arithmetic variables

2016-10-06 Thread Bastian Bittorf
* Jo-Philipp Wich [06.10.2016 16:35]: > removing the dollar signs lets expressions succeed which would otherwise > fail - which means it introduces a behavior change. thanks for showing this. i must repeat myself: before we merge such cleanups, we should write tests and checkers for proving that

Re: [LEDE-DEV] [PATCH v3 04/13] scripts: $/${} is unnecessary on arithmetic variables

2016-10-06 Thread John Crispin
On 06/10/2016 16:44, Bastian Bittorf wrote: > * Jo-Philipp Wich [06.10.2016 16:35]: >> removing the dollar signs lets expressions succeed which would otherwise >> fail - which means it introduces a behavior change. > > thanks for showing this. i must repeat myself: > > before we merge such cle

Re: [LEDE-DEV] [PATCH v3 04/13] scripts: $/${} is unnecessary on arithmetic variables

2016-10-06 Thread Jan-Tarek Butt
> > On 06/10/2016 16:44, Bastian Bittorf wrote: >> * Jo-Philipp Wich [06.10.2016 16:35]: >>> removing the dollar signs lets expressions succeed which would otherwise >>> fail - which means it introduces a behavior change. >> >> thanks for showing this. i must repeat myself: >> >> before we merge