summaryrefslogtreecommitdiff
path: root/string-list.c
diff options
context:
space:
mode:
authorJulian Phillips <julian@quantumfyre.co.uk>2010-06-26 00:41:36 +0100
committerJunio C Hamano <gitster@pobox.com>2010-06-27 10:06:51 -0700
commitaadceea641806b363ca555ffdc04109ea716c497 (patch)
treebae93989bf8c6169b23c1c43b8fb0810665ebfaf /string-list.c
parent78a395d371ec9fd14297178ec98b8b1042a64fb6 (diff)
downloadgit-aadceea641806b363ca555ffdc04109ea716c497.tar.gz
string_list: Fix argument order for string_list_insert_at_index
Update the definition and callers of string_list_insert_at_index to use the string_list as the first argument. This helps make the string_list API easier to use by being more consistent. Signed-off-by: Julian Phillips <julian@quantumfyre.co.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'string-list.c')
-rw-r--r--string-list.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/string-list.c b/string-list.c
index de89efd2d8..84444c2c19 100644
--- a/string-list.c
+++ b/string-list.c
@@ -53,11 +53,11 @@ static int add_entry(int insert_at, struct string_list *list, const char *string
struct string_list_item *string_list_insert(struct string_list *list, const char *string)
{
- return string_list_insert_at_index(-1, string, list);
+ return string_list_insert_at_index(list, -1, string);
}
-struct string_list_item *string_list_insert_at_index(int insert_at,
- const char *string, struct string_list *list)
+struct string_list_item *string_list_insert_at_index(struct string_list *list,
+ int insert_at, const char *string)
{
int index = add_entry(insert_at, list, string);