ALLOC_GROW(list->items, list->nr+1, list->alloc);
if (index < list->nr)
- memmove(list->items + index + 1, list->items + index,
- (list->nr - index)
- * sizeof(struct string_list_item));
+ MOVE_ARRAY(list->items + index + 1, list->items + index,
+ list->nr - index);
list->items[index].string = list->strdup_strings ?
xstrdup(string) : (char *)string;
list->items[index].util = NULL;
free(list->items[i].util);
list->nr--;
- memmove(list->items + i, list->items + i + 1,
- (list->nr - i) * sizeof(struct string_list_item));
+ MOVE_ARRAY(list->items + i, list->items + i + 1, list->nr - i);
}
}