kconfig: remove const qualifier from str_get()
update_text() apparently edits the buffer returned by str_get(). (and there is no reason why it shouldn't) Remove 'const' quailifier and casting. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
This commit is contained in:
parent
1791360cb3
commit
4d980fd111
@ -76,7 +76,7 @@ struct gstr str_new(void);
|
|||||||
void str_free(struct gstr *gs);
|
void str_free(struct gstr *gs);
|
||||||
void str_append(struct gstr *gs, const char *s);
|
void str_append(struct gstr *gs, const char *s);
|
||||||
void str_printf(struct gstr *gs, const char *fmt, ...);
|
void str_printf(struct gstr *gs, const char *fmt, ...);
|
||||||
const char *str_get(struct gstr *gs);
|
char *str_get(struct gstr *gs);
|
||||||
|
|
||||||
/* menu.c */
|
/* menu.c */
|
||||||
void _menu_init(void);
|
void _menu_init(void);
|
||||||
|
@ -440,8 +440,8 @@ again:
|
|||||||
|
|
||||||
res = get_relations_str(sym_arr, &head);
|
res = get_relations_str(sym_arr, &head);
|
||||||
set_subtitle();
|
set_subtitle();
|
||||||
dres = show_textbox_ext("Search Results", (char *)
|
dres = show_textbox_ext("Search Results", str_get(&res), 0, 0,
|
||||||
str_get(&res), 0, 0, keys, &vscroll,
|
keys, &vscroll,
|
||||||
&hscroll, &update_text, (void *)
|
&hscroll, &update_text, (void *)
|
||||||
&data);
|
&data);
|
||||||
again = false;
|
again = false;
|
||||||
|
@ -74,7 +74,7 @@ void str_printf(struct gstr *gs, const char *fmt, ...)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Retrieve value of growable string */
|
/* Retrieve value of growable string */
|
||||||
const char *str_get(struct gstr *gs)
|
char *str_get(struct gstr *gs)
|
||||||
{
|
{
|
||||||
return gs->s;
|
return gs->s;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user