bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Regression with declare -i and arrays


From: Eduardo A . Bustamante López
Subject: Re: Regression with declare -i and arrays
Date: Fri, 3 Apr 2015 20:48:35 -0600
User-agent: Mutt/1.5.23 (2014-03-12)

Here's a patch:


diff --git a/builtins/declare.def b/builtins/declare.def
index 5ed83a0..f0f9a6d 100644
--- a/builtins/declare.def
+++ b/builtins/declare.def
@@ -280,7 +280,7 @@ declare_internal (list, local_var)
       return (sh_chkwrite (any_failed ? EXECUTION_FAILURE : 
EXECUTION_SUCCESS));
     }
 
-#define NEXT_VARIABLE() free (name); list = list->next; continue
+#define NEXT_VARIABLE() do { free (name); list = list->next; continue; } 
while(0)
 
   /* There are arguments left, so we are making variables. */
   while (list)         /* declare [-aAfFirx] name [name ...] */

-- 
Eduardo Bustamante
https://dualbus.me/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]