From f3715b4596a3fada724710c02f7b1b0c9ea42e51 Mon Sep 17 00:00:00 2001 From: Jonathan Hui Date: Fri, 11 Oct 2024 13:38:40 -0700 Subject: [PATCH] [check-size] SC2004: `$`/`${}` is unnecessary on arithmetic variables (#10820) --- script/check-size | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/script/check-size b/script/check-size index 7317b6c3794..929d41720f7 100755 --- a/script/check-size +++ b/script/check-size @@ -215,9 +215,9 @@ generate_size_diff() local -a size_diff for i in 0 1 2 3; do - size_diff[$i]="$((size_new["$i"] - size_old["$i"]))" - if [[ ${size_diff["$i"]} != 0 ]]; then - size_diff["$i"]=$(printf '%+d' "${size_diff["$i"]}") + size_diff[i]="$((size_new[i] - size_old[i]))" + if [[ ${size_diff[i]} != 0 ]]; then + size_diff[i]=$(printf '%+d' "${size_diff[i]}") fi done