[PATCH 2/2] ld.hugetlbfs: switch to posix arithmetic expansion

9 views
Skip to first unread message

Jim Hill

unread,
Apr 23, 2021, 5:17:01 PM4/23/21
to libhugetlbfs
The single-brace arithmetic expansion is (slowly) being deprecated, see

Signed-off-by: Jim Hill <gjt...@gmail.com>
---
 ld.hugetlbfs | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/ld.hugetlbfs b/ld.hugetlbfs
index 5153632..57899ba 100755
--- a/ld.hugetlbfs
+++ b/ld.hugetlbfs
@@ -38,12 +38,12 @@ while [ -n "$1" ]; do
  -m*)
      EMU="${arg#-m}"
      args[$i]="$arg"
-     i=$[i+1]
+     i=$((i+1))
      if [ -z "$EMU" ]; then
  shift
  EMU="$1"
  args[$i]="$1"
- i=$[i+1]
+ i=$((i+1))
      fi
      ;;
  --hugetlbfs-link=*)
@@ -65,7 +65,7 @@ while [ -n "$1" ]; do
      ;;
  *)
      args[$i]="$arg"
-     i=$[i+1]
+     i=$((i+1))
      ;;
     esac
     shift
-- 
2.31.1.528.g17d3d77219

Reply all
Reply to author
Forward
0 new messages