[prev in list] [next in list] [prev in thread] [next in thread] 

List:       lvm2-commits
Subject:    =?utf-8?q?=5Blvm2-commits=5D?= master - tests: shellcheck split assing
From:       Zdenek Kabelac <zkabelac () sourceware ! org>
Date:       2018-03-23 16:26:27
Message-ID: 20180323162627.F2FB224C9B1CF () mailman01 ! phx2 ! fedoraproject ! org
[Download RAW message or body]

Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=1507956383b9b28e52051ecf56d754e8cda6e025
Commit:        1507956383b9b28e52051ecf56d754e8cda6e025
Parent:        397b7891ff79ba7c31040c31c17aa8587e78a9a6
Author:        Zdenek Kabelac <zkabelac@redhat.com>
AuthorDate:    Fri Mar 23 17:03:00 2018 +0100
Committer:     Zdenek Kabelac <zkabelac@redhat.com>
CommitterDate: Fri Mar 23 17:25:00 2018 +0100

tests: shellcheck split assing

Keep possibly error unmasked by assign
---
 test/lib/aux.sh |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/test/lib/aux.sh b/test/lib/aux.sh
index f8fb8a3..4269987 100644
--- a/test/lib/aux.sh
+++ b/test/lib/aux.sh
@@ -1107,7 +1107,9 @@ prepare_vg() {
 }
 
 extend_filter() {
-	local filter=$(grep ^devices/global_filter CONFIG_VALUES | tail -n 1)
+	local filter
+
+	filter=$(grep ^devices/global_filter CONFIG_VALUES | tail -n 1)
 	for rx in "$@"; do
 		filter=$(echo "$filter" | sed -e "s:\\[:[ \"$rx\", :")
 	done
@@ -1119,7 +1121,9 @@ extend_filter_LVMTEST() {
 }
 
 hide_dev() {
-	local filter=$(grep ^devices/global_filter CONFIG_VALUES | tail -n 1)
+	local filter
+
+	filter=$(grep ^devices/global_filter CONFIG_VALUES | tail -n 1)
 	for dev in "$@"; do
 		filter=$(echo "$filter" | sed -e "s:\\[:[ \"r|$dev|\", :")
 	done
@@ -1127,7 +1131,9 @@ hide_dev() {
 }
 
 unhide_dev() {
-	local filter=$(grep ^devices/global_filter CONFIG_VALUES | tail -n 1)
+	local filter
+
+	filter=$(grep ^devices/global_filter CONFIG_VALUES | tail -n 1)
 	for dev in "$@"; do
 		filter=$(echo "$filter" | sed -e "s:\"r|$dev|\", ::")
 	done
_______________________________________________
lvm2-commits mailing list -- lvm2-commits@lists.fedorahosted.org
To unsubscribe send an email to lvm2-commits-leave@lists.fedorahosted.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic