From 041aab49568e6e7051d3dd7673f63480c95c0bcc Mon Sep 17 00:00:00 2001 From: Christoph Niethammer Date: Wed, 18 May 2016 14:02:54 +0000 Subject: [PATCH] Declare variables in functions as local. --- functions.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/functions.sh b/functions.sh index 03c8980..0c132fc 100644 --- a/functions.sh +++ b/functions.sh @@ -1,15 +1,15 @@ sit_fail() { - msg="SIT: Fail: $1" + local msg="SIT: Fail: $1" echo "$msg" exit 1 } sit_warn() { - msg=$1 - echo "SIT: Warning: " $msg + local msg=$1 + echo "SIT: Warning: $msg" } sit_info() { - msg=$1 - echo "SIT: " $msg + local msg=$1 + echo "SIT: $msg" }