[Top][All Lists]

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

Re: Regression with declare -i and arrays

From: Eduardo Bustamante
Subject: Re: Regression with declare -i and arrays
Date: Fri, 3 Apr 2015 21:01:59 -0600

Nevermind. The patch is wrong, but at least it shows where the problem is (if needs braces, around line 529)

El abr 3, 2015 8:48 PM, "Eduardo A. Bustamante López" <address@hidden> escribió:
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

reply via email to

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