jshn: improve performance by using let instead of $(( ))

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
This commit is contained in:
Felix Fietkau 2014-11-23 19:25:39 +01:00
parent d133da5562
commit d5d384b0ba

View file

@ -42,7 +42,7 @@ _json_inc() {
# var=$1
# dest=$2
eval "${JSON_PREFIX}$1=\$(( \${${JSON_PREFIX}$1:-0} + 1))${2:+; $2=\"\$${JSON_PREFIX}$1\"}"
let "${JSON_PREFIX}$1 += 1" "$2 = ${JSON_PREFIX}$1"
}
_json_add_generic() {