[PATCH 1/8] dim: declare and assign separately

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Fixes shellcheck SC2155: Declare and assign separately to avoid masking
return values.

Signed-off-by: Jani Nikula <jani.nikula@xxxxxxxxx>
---
 dim | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dim b/dim
index 94bdce9dd6cd..c36ebdc7f7d8 100755
--- a/dim
+++ b/dim
@@ -1079,7 +1079,7 @@ function checkpatch_commit
 
 	# FIXME: this relies on local assignment not failing on command
 	# substitution failures
-	local bug_lines=$($cmd | grep -m 1 -B 1 '^\+.*\WBUG' | grep -c '^[+-].*\WBUG')
+	bug_lines=$($cmd | grep -m 1 -B 1 '^\+.*\WBUG' | grep -c '^[+-].*\WBUG')
 	if test "$bug_lines" -eq 1; then
 		warn_or_fail "New BUG macro added"
 	fi
@@ -1087,7 +1087,7 @@ function checkpatch_commit
         if [ "$branch" = "drm-intel-next-queued" ]; then
 		# FIXME: this relies on local assignment not failing on command
 		# substitution failures
-		local non_i915_files=$(git diff-tree --no-commit-id --name-only -r $commit | \
+		non_i915_files=$(git diff-tree --no-commit-id --name-only -r $commit | \
 			grep -v "^\(drivers/gpu/drm/i915/\|include/drm/i915\|include/uapi/drm/i915\)")
 
 		if [ -n "$non_i915_files" ]; then
-- 
2.1.4

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux