]> git.ipfire.org Git - thirdparty/bash.git/blobdiff - array.c
bash-20140131 remove leftover and stray files
[thirdparty/bash.git] / array.c
diff --git a/array.c b/array.c
index b601d58648b5c09c8a2e29786c6f383631581a48..4359a52fa1d88e4d52fcff439092bb89950e9084 100644 (file)
--- a/array.c
+++ b/array.c
@@ -631,12 +631,16 @@ char      *v;
                SET_LASTREF(a, new);
                return(0);
        }
+#if OPTIMIZE_SEQUENTIAL_ARRAY_ASSIGNMENT
        /*
         * Otherwise we search for the spot to insert it.  The lastref
         * handle optimizes the case of sequential or almost-sequential
         * assignments that are not at the end of the array.
         */
        start = LASTREF_START(a, i);
+#else
+       start = element_forw(ae->head);
+#endif
        for (ae = start; ae != a->head; ae = element_forw(ae)) {
                if (element_index(ae) == i) {
                        /*