[PATCH] email-sh-functions: add local variables to parse_prj_config

Artem Bityutskiy dedekind1 at gmail.com
Mon Feb 3 05:28:33 EST 2014


From: Jacob Keller <jacob.e.keller at intel.com>

Rather than assuming that the $cfgfile and $prj will be correctly defined, use
the passed parameters. Use local to create local variables to use, just like
in the regular config parsing.

Signed-off-by: Jacob Keller <jacob.e.keller at intel.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy at linux.intel.com>
---
 email/aiaiai-email-sh-functions | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/email/aiaiai-email-sh-functions b/email/aiaiai-email-sh-functions
index 0fbeb94..a8156af 100644
--- a/email/aiaiai-email-sh-functions
+++ b/email/aiaiai-email-sh-functions
@@ -166,6 +166,9 @@ parse_config()
 # Usage: parse_prj_config <cfgfile> <prj>
 parse_prj_config()
 {
+	local cfgfile="$1"; shift
+	local prj="$1"; shift
+
 	cfg_name="$(ini_config_get "$cfgfile" "prj_$prj" "name")"
 	[ -n "$cfg_name" ] || return 0
 
-- 
1.8.5.2




More information about the aiaiai mailing list