From 847b6e15110004f440d09ac2206ff112e9bafeaf Mon Sep 17 00:00:00 2001 From: Tom de Vries Date: Mon, 18 May 2015 07:07:36 +0000 Subject: check_GNU_style.sh: Declare local vars with local 2015-05-18 Tom de Vries * check_GNU_style.sh (g, ag, vg, col): Declare local vars with local. From-SVN: r223283 --- contrib/check_GNU_style.sh | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'contrib/check_GNU_style.sh') diff --git a/contrib/check_GNU_style.sh b/contrib/check_GNU_style.sh index b86c4742acf..728c11a691d 100755 --- a/contrib/check_GNU_style.sh +++ b/contrib/check_GNU_style.sh @@ -82,8 +82,8 @@ grep $format '^+' $files \ # Grep g (){ - msg="$1" - arg="$2" + local msg="$1" + local arg="$2" cat $inp \ | egrep --color=always -- "$arg" \ > $tmp && printf "\n$msg\n" @@ -92,9 +92,9 @@ g (){ # And Grep ag (){ - msg="$1" - arg1="$2" - arg2="$3" + local msg="$1" + local arg1="$2" + local arg2="$3" cat $inp \ | egrep --color=always -- "$arg1" \ | egrep --color=always -- "$arg2" \ @@ -104,9 +104,9 @@ ag (){ # reVerse Grep vg (){ - msg="$1" - varg="$2" - arg="$3" + local msg="$1" + local varg="$2" + local arg="$3" cat $inp \ | egrep -v -- "$varg" \ | egrep --color=always -- "$arg" \ @@ -115,7 +115,7 @@ vg (){ } col (){ - msg="$1" + local msg="$1" local first=true local f for f in $files; do -- cgit v1.2.3