[Intel-gfx] [dim PATCH 03/10] dim: replace expr with $((..))

Jani Nikula jani.nikula at intel.com
Fri Mar 17 10:42:54 UTC 2017


Fix shellcheck SC2003: expr is antiquated. Consider rewriting this using
$((..)), ${} or [[ ]].

Signed-off-by: Jani Nikula <jani.nikula at intel.com>
---
 Makefile | 1 -
 dim      | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index a3a1c8dba3ed..a5cfd7b00d4b 100644
--- a/Makefile
+++ b/Makefile
@@ -23,7 +23,6 @@ SC_EXCLUDE := \
 	-e SC1083 \
 	-e SC2001 \
 	-e SC2002 \
-	-e SC2003 \
 	-e SC2005 \
 	-e SC2006 \
 	-e SC2034 \
diff --git a/dim b/dim
index 964dfcb655cb..26e8bffe011e 100755
--- a/dim
+++ b/dim
@@ -157,7 +157,7 @@ while getopts hdfi opt; do
 			exit
 	esac
 done
-shift `expr $OPTIND - 1`
+shift $((OPTIND - 1))
 
 # first positional argument is the subcommand
 if [ -n "$HELP" -o "$#" = "0" ]; then
-- 
2.1.4



More information about the Intel-gfx mailing list