projects
/
project
/
libubox.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
jshn: improve performance by using let instead of $(( ))
[project/libubox.git]
/
sh
/
jshn.sh
diff --git
a/sh/jshn.sh
b/sh/jshn.sh
index
5db1667
..
f5cf1d2
100644
(file)
--- a/
sh/jshn.sh
+++ b/
sh/jshn.sh
@@
-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() {