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:
committed by
Junio C Hamano
parent
aadceea641
commit
e8c8b7139c
@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user