summaryrefslogtreecommitdiffstats
path: root/lib/locale.sh
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2012-09-04 22:01:39 (EDT)
committer P. J. McDermott <pjm@nac.net>2012-09-04 22:01:39 (EDT)
commitbfaf709d6544fb5b53d7e498ba3f1ccae22e1302 (patch)
treec52acaf86cec55718a21fd7eea8b504652b3e225 /lib/locale.sh
parent5116e84e22608d055a3e7bbffdca2e857264c84f (diff)
Clean up "stack variables".
Diffstat (limited to 'lib/locale.sh')
-rw-r--r--lib/locale.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/locale.sh b/lib/locale.sh
index 06bd60a..7cc1635 100644
--- a/lib/locale.sh
+++ b/lib/locale.sh
@@ -34,6 +34,7 @@ ob_set_locale()
_obsl_locale="${1}"
_obsl_domain="${2}"
else
+ unset _obsl_locale _obsl_domain
return 125
fi
@@ -57,11 +58,13 @@ ob_set_locale()
if ! _ob_try_load_locale "${_OB_DEFAULT_LOCALE}" \
"${_obsl_domain}"; then
printf 'Error: cannot load locale file\n'
+ unset _obsl_locale _obsl_domain
return 1
fi
fi
fi
+ unset _obsl_locale _obsl_domain
return 0
}
@@ -74,8 +77,10 @@ _ob_try_load_locale()
if [ -f "${_obtll_ms}" ]; then
. "${_obtll_ms}"
else
+ unset _obtll_locale _obtll_domain _obtll_ms
return 1
fi
+ unset _obtll_locale _obtll_domain _obtll_ms
return 0
}