From bfaf709d6544fb5b53d7e498ba3f1ccae22e1302 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Tue, 04 Sep 2012 22:01:39 -0400 Subject: Clean up "stack variables". --- (limited to 'lib/locale.sh') 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 } -- cgit v0.9.1