Declare variables in functions as local.

This commit is contained in:
Christoph Niethammer 2016-05-18 14:02:54 +00:00
parent ec4cf00257
commit 041aab4956

View file

@ -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"
}