From 78a395d371ec9fd14297178ec98b8b1042a64fb6 Mon Sep 17 00:00:00 2001 From: Julian Phillips Date: Sat, 26 Jun 2010 00:41:35 +0100 Subject: string_list: Fix argument order for string_list_insert Update the definition and callers of string_list_insert 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 Signed-off-by: Junio C Hamano --- http-backend.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'http-backend.c') diff --git a/http-backend.c b/http-backend.c index d1e83d0906..0e7af4eebb 100644 --- a/http-backend.c +++ b/http-backend.c @@ -92,7 +92,7 @@ static struct string_list *get_parameters(void) i = string_list_lookup(name, query_params); if (!i) - i = string_list_insert(name, query_params); + i = string_list_insert(query_params, name); else free(i->util); i->util = value; -- cgit v1.2.1 From e8c8b7139c87c3e3017d3bff07f91c4349850d58 Mon Sep 17 00:00:00 2001 From: Julian Phillips Date: Sat, 26 Jun 2010 00:41:37 +0100 Subject: string_list: Fix argument order for string_list_lookup Update the definition and callers of string_list_lookup 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 Signed-off-by: Junio C Hamano --- http-backend.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'http-backend.c') diff --git a/http-backend.c b/http-backend.c index 0e7af4eebb..8ec15f99c0 100644 --- a/http-backend.c +++ b/http-backend.c @@ -90,7 +90,7 @@ static struct string_list *get_parameters(void) char *value = decode_parameter(&query, 0); struct string_list_item *i; - i = string_list_lookup(name, query_params); + i = string_list_lookup(query_params, name); if (!i) i = string_list_insert(query_params, name); else @@ -104,7 +104,7 @@ static struct string_list *get_parameters(void) static const char *get_parameter(const char *name) { struct string_list_item *i; - i = string_list_lookup(name, get_parameters()); + i = string_list_lookup(get_parameters(), name); return i ? i->util : NULL; } -- cgit v1.2.1