I have no idea how the previous formula was supposed to work at all, but
this one is the same as our alignof code to make sure we do allocate to
the really nearest size and don't do over allocation. Additionnaly it works.
else
{
// realloc back down - rounding up to the nearest step size
- size = (array->count + array->step - 1) % array->step;
+ size = ((array->count / array->step) + (array->count % array->step ? 1 : 0)) * array->step;
tmp = realloc(array->data, sizeof(void *) * size);
if (!tmp) return EINA_FALSE;
array->total = size;