stringlist: the string argument should be const
Signed-off-by: Jan Luebbe <jlu@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
parent
2fd1b13969
commit
0d752cb78c
|
@ -8,9 +8,9 @@ struct string_list {
|
|||
char *str;
|
||||
};
|
||||
|
||||
int string_list_add(struct string_list *sl, char *str);
|
||||
int string_list_add(struct string_list *sl, const char *str);
|
||||
int string_list_add_asprintf(struct string_list *sl, const char *fmt, ...);
|
||||
int string_list_add_sorted(struct string_list *sl, char *str);
|
||||
int string_list_add_sorted(struct string_list *sl, const char *str);
|
||||
int string_list_contains(struct string_list *sl, const char *str);
|
||||
void string_list_print_by_column(struct string_list *sl);
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ static int string_list_compare(struct list_head *a, struct list_head *b)
|
|||
return strcmp(astr, bstr);
|
||||
}
|
||||
|
||||
int string_list_add(struct string_list *sl, char *str)
|
||||
int string_list_add(struct string_list *sl, const char *str)
|
||||
{
|
||||
struct string_list *new;
|
||||
|
||||
|
@ -48,7 +48,7 @@ int string_list_add_asprintf(struct string_list *sl, const char *fmt, ...)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int string_list_add_sorted(struct string_list *sl, char *str)
|
||||
int string_list_add_sorted(struct string_list *sl, const char *str)
|
||||
{
|
||||
struct string_list *new;
|
||||
|
||||
|
|
Loading…
Reference in New Issue