summaryrefslogtreecommitdiff
path: root/scripts/kconfig/util.c
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2018-02-08 19:19:08 +0300
committerMasahiro Yamada <yamada.masahiro@socionext.com>2018-02-10 05:31:49 +0300
commit523ca58b7db2e30e3c185a7927dd80a30c1bc743 (patch)
tree59c135f8bde7d4ec24f1270c1d8615b8b142f296 /scripts/kconfig/util.c
parentd717f24d8c68081caae2374cf5ea6c4e62c490fc (diff)
downloadlinux-523ca58b7db2e30e3c185a7927dd80a30c1bc743.tar.xz
kconfig: remove const qualifier from sym_expand_string_value()
This function returns realloc'ed memory, so the returned pointer must be passed to free() when done. So, 'const' qualifier is odd. It is allowed to modify the expanded string. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'scripts/kconfig/util.c')
-rw-r--r--scripts/kconfig/util.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/kconfig/util.c b/scripts/kconfig/util.c
index 138894ef49ea..b98a79e30e04 100644
--- a/scripts/kconfig/util.c
+++ b/scripts/kconfig/util.c
@@ -14,11 +14,11 @@
struct file *file_lookup(const char *name)
{
struct file *file;
- const char *file_name = sym_expand_string_value(name);
+ char *file_name = sym_expand_string_value(name);
for (file = file_list; file; file = file->next) {
if (!strcmp(name, file->name)) {
- free((void *)file_name);
+ free(file_name);
return file;
}
}