diff options
author | Masahiro Yamada <masahiroy@kernel.org> | 2024-02-02 18:58:16 +0300 |
---|---|---|
committer | Masahiro Yamada <masahiroy@kernel.org> | 2024-02-19 12:20:41 +0300 |
commit | 5b058034e3aa600802ab609e8264dc2ca1300ebe (patch) | |
tree | b40e310dcfe6b0b32ac8819392ab255813259f89 /scripts/kconfig/lexer.l | |
parent | 6676c5bc15e66268c9c9669d5852aa779689c74e (diff) | |
download | linux-5b058034e3aa600802ab609e8264dc2ca1300ebe.tar.xz |
kconfig: change file_lookup() to return the file name
Currently, file_lookup() returns a pointer to (struct file), but the
callers use only file->name.
Make it return the ->name member directly.
This adjustment encapsulates struct file and file_list as internal
implementation.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Diffstat (limited to 'scripts/kconfig/lexer.l')
-rw-r--r-- | scripts/kconfig/lexer.l | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/scripts/kconfig/lexer.l b/scripts/kconfig/lexer.l index 71f651bb82ba..89544c3a1a29 100644 --- a/scripts/kconfig/lexer.l +++ b/scripts/kconfig/lexer.l @@ -401,13 +401,12 @@ void zconf_initscan(const char *name) exit(1); } - cur_filename = file_lookup(name)->name; + cur_filename = file_lookup(name); yylineno = 1; } void zconf_nextfile(const char *name) { - struct file *file = file_lookup(name); struct buffer *buf = xmalloc(sizeof(*buf)); bool recur_include = false; @@ -443,7 +442,7 @@ void zconf_nextfile(const char *name) } yylineno = 1; - cur_filename = file->name; + cur_filename = file_lookup(name); } static void zconf_endfile(void) |