Merge branch 'sf/putty-w-args'
[gitweb.git] / string-list.c
index 45016ad86dd5eb55534524cb50e30542e87fab70..003ca1879ef560b3db0ad9e1af8022c38800b500 100644 (file)
@@ -41,10 +41,7 @@ static int add_entry(int insert_at, struct string_list *list, const char *string
        if (exact_match)
                return -1 - index;
 
-       if (list->nr + 1 >= list->alloc) {
-               list->alloc += 32;
-               REALLOC_ARRAY(list->items, list->alloc);
-       }
+       ALLOC_GROW(list->items, list->nr+1, list->alloc);
        if (index < list->nr)
                memmove(list->items + index + 1, list->items + index,
                                (list->nr - index)