aboutsummaryrefslogtreecommitdiffstats
path: root/builtins/let.def
diff options
context:
space:
mode:
authorJari Aalto <jari.aalto@cante.net>1997-06-05 14:59:13 +0000
committerJari Aalto <jari.aalto@cante.net>2009-09-12 16:46:50 +0000
commitd166f048818e10cf3799aa24a174fb22835f1acc (patch)
tree1ca27f9243900f8b236d0cde6a3862002aea9e19 /builtins/let.def
parentccc6cda312fea9f0468ee65b8f368e9653e1380b (diff)
downloadandroid_external_bash-d166f048818e10cf3799aa24a174fb22835f1acc.tar.gz
android_external_bash-d166f048818e10cf3799aa24a174fb22835f1acc.tar.bz2
android_external_bash-d166f048818e10cf3799aa24a174fb22835f1acc.zip
Imported from ../bash-2.01.tar.gz.
Diffstat (limited to 'builtins/let.def')
-rw-r--r--builtins/let.def17
1 files changed, 12 insertions, 5 deletions
diff --git a/builtins/let.def b/builtins/let.def
index 60b6675..b747962 100644
--- a/builtins/let.def
+++ b/builtins/let.def
@@ -75,6 +75,7 @@ let_builtin (list)
WORD_LIST *list;
{
long ret;
+ int expok;
if (list == 0)
{
@@ -83,17 +84,22 @@ let_builtin (list)
}
for (; list; list = list->next)
- ret = evalexp (list->word->word);
+ {
+ ret = evalexp (list->word->word, &expok);
+ if (expok == 0)
+ return (EXECUTION_FAILURE);
+ }
return ((ret == 0L) ? EXECUTION_FAILURE : EXECUTION_SUCCESS);
}
+#ifdef INCLUDE_UNUSED
int
exp_builtin (list)
WORD_LIST *list;
{
char *exp;
- int ret;
+ int ret, expok;
if (list == 0)
{
@@ -102,7 +108,8 @@ exp_builtin (list)
}
exp = string_list (list);
- ret = evalexp (exp);
- free (exp);
- return ((ret == 0L) ? EXECUTION_FAILURE : EXECUTION_SUCCESS);
+ ret = evalexp (exp, &expok);
+ (void)free (exp);
+ return (((ret == 0L) || (expok == 0)) ? EXECUTION_FAILURE : EXECUTION_SUCCESS);
}
+#endif