projects
/
oweals
/
libubox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d133da5
)
jshn: improve performance by using let instead of $(( ))
author
Felix Fietkau
<nbd@openwrt.org>
Sun, 23 Nov 2014 18:25:39 +0000
(19:25 +0100)
committer
Felix Fietkau
<nbd@openwrt.org>
Sun, 23 Nov 2014 18:25:39 +0000
(19:25 +0100)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
sh/jshn.sh
patch
|
blob
|
history
diff --git
a/sh/jshn.sh
b/sh/jshn.sh
index 5db1667d1f69ecec400c9d4a4de1970a5b36f990..f5cf1d2ad9b32e22ac60f40a230c5556533fe2b2 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() {