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 <julian@quantumfyre.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Julian Phillips
2010-06-26 00:41:37 +01:00
committed by Junio C Hamano
parent aadceea641
commit e8c8b7139c
11 changed files with 17 additions and 17 deletions

View File

@ -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;
}