linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: fdmanana@kernel.org
To: fstests@vger.kernel.org
Cc: linux-btrfs@vger.kernel.org, Filipe Manana <fdmanana@suse.com>
Subject: [PATCH 1/2] fstests: btrfs/081 declare local variables as local
Date: Fri, 25 Jan 2019 11:46:11 +0000	[thread overview]
Message-ID: <20190125114611.3954-1-fdmanana@kernel.org> (raw)

From: Filipe Manana <fdmanana@suse.com>

Some variables inside the test's functions were used as local but were not
being declared as such. Add the local declaration for them.

Signed-off-by: Filipe Manana <fdmanana@suse.com>
---
 tests/btrfs/081 | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/tests/btrfs/081 b/tests/btrfs/081
index dc357e53..7e83525f 100755
--- a/tests/btrfs/081
+++ b/tests/btrfs/081
@@ -45,7 +45,7 @@ extent_size=8192
 
 create_source_file()
 {
-	name=$1
+	local name=$1
 
 	# Create a file with $num_extents extents, each with a size of
 	# $extent_size bytes.
@@ -60,8 +60,8 @@ create_source_file()
 
 create_target_file()
 {
-	name=$1
-	file_size=$(($num_extents * $extent_size))
+	local name=$1
+	local file_size=$(($num_extents * $extent_size))
 
 	$XFS_IO_PROG -f -c "pwrite -S 0xff 0 $file_size" \
 		-c "fsync" $SCRATCH_MNT/$name | _filter_xfs_io
@@ -69,7 +69,7 @@ create_target_file()
 
 reader_loop()
 {
-	name=$1
+	local name=$1
 
 	while true; do
 		cat $SCRATCH_MNT/$name > /dev/null
-- 
2.11.0


                 reply	other threads:[~2019-01-25 11:46 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190125114611.3954-1-fdmanana@kernel.org \
    --to=fdmanana@kernel.org \
    --cc=fdmanana@suse.com \
    --cc=fstests@vger.kernel.org \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).