Skip to content

Commit 4d980fd

Browse files
committed
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 <[email protected]>
1 parent 1791360 commit 4d980fd

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

scripts/kconfig/lkc.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ struct gstr str_new(void);
7676
void str_free(struct gstr *gs);
7777
void str_append(struct gstr *gs, const char *s);
7878
void str_printf(struct gstr *gs, const char *fmt, ...);
79-
const char *str_get(struct gstr *gs);
79+
char *str_get(struct gstr *gs);
8080

8181
/* menu.c */
8282
void _menu_init(void);

scripts/kconfig/mconf.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -440,8 +440,8 @@ static void search_conf(void)
440440

441441
res = get_relations_str(sym_arr, &head);
442442
set_subtitle();
443-
dres = show_textbox_ext("Search Results", (char *)
444-
str_get(&res), 0, 0, keys, &vscroll,
443+
dres = show_textbox_ext("Search Results", str_get(&res), 0, 0,
444+
keys, &vscroll,
445445
&hscroll, &update_text, (void *)
446446
&data);
447447
again = false;

scripts/kconfig/util.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ void str_printf(struct gstr *gs, const char *fmt, ...)
7474
}
7575

7676
/* Retrieve value of growable string */
77-
const char *str_get(struct gstr *gs)
77+
char *str_get(struct gstr *gs)
7878
{
7979
return gs->s;
8080
}

0 commit comments

Comments
 (0)