1.1 --- a/templates/native/list.c Sun Mar 05 22:38:54 2017 +0100
1.2 +++ b/templates/native/list.c Sun Mar 05 23:00:56 2017 +0100
1.3 @@ -75,12 +75,11 @@
1.4 __fragment *newdata = data;
1.5 unsigned int size = data->size, capacity = data->capacity;
1.6 unsigned int other_size = other_data->size;
1.7 - unsigned int i, j, n;
1.8 + unsigned int i, j, n = size + other_size;
1.9
1.10 /* Re-allocate the fragment if the capacity has been reached. */
1.11 - if (size + other_size >= capacity)
1.12 + if (n >= capacity)
1.13 {
1.14 - n = size + other_size;
1.15 newdata = (__fragment *) __REALLOCATE(data, __FRAGMENT_SIZE(n));
1.16 newdata->capacity = n;
1.17 }