From 61023cbd32725a07e094f9b2d01df302f4ddabba Mon Sep 17 00:00:00 2001 From: Cody Scott Date: Fri, 5 Apr 2024 09:10:07 -0400 Subject: [PATCH] Remove variable expansion in arithmetic https://www.shellcheck.net/wiki/SC2004 --- tools/rpi-otp-private-key | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/rpi-otp-private-key b/tools/rpi-otp-private-key index 68e8013..5d5a10f 100755 --- a/tools/rpi-otp-private-key +++ b/tools/rpi-otp-private-key @@ -50,8 +50,8 @@ check_key_set() { } read_key() { - out=READ_KEY="$(vcmailbox 0x00030081 $((8 + $ROW_COUNT * 4)) $((8 + $ROW_COUNT * 4)) $ROW_OFFSET $ROW_COUNT 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0)" || die "Failed to read the current key from OTP" - READ_KEY="$(echo "${out}" | sed 's/0x//g' | awk -v last=$((8 + $ROW_COUNT)) '{for(i=8;i