string_list: Fix argument order for string_list_lookup
[gitweb.git] / http-backend.c
index d1e83d0906dbc9d677630cdf74615ec3f9dfc46d..8ec15f99c05cbdcc432cce95bdf1b6a45347368d 100644 (file)
@@ -90,9 +90,9 @@ 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(name, query_params);
+                               i = string_list_insert(query_params, name);
                        else
                                free(i->util);
                        i->util = value;
@@ -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;
 }