aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/kconfig/confdata.c
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2018-02-09 01:19:07 +0900
committerMasahiro Yamada <yamada.masahiro@socionext.com>2018-02-10 11:26:04 +0900
commitd717f24d8c68081caae2374cf5ea6c4e62c490fc (patch)
tree325008cf6d2fea2dfa15e4d49ae4d4d79fb1ff2b /scripts/kconfig/confdata.c
parentkconfig: send error messages to stderr (diff)
downloadlinux-dev-d717f24d8c68081caae2374cf5ea6c4e62c490fc.tar.xz
linux-dev-d717f24d8c68081caae2374cf5ea6c4e62c490fc.zip
kconfig: add xrealloc() helper
We already have xmalloc(), xcalloc(). Add xrealloc() as well to save tedious error handling. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'scripts/kconfig/confdata.c')
-rw-r--r--scripts/kconfig/confdata.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c
index f7927391de30..5c12dc91ef34 100644
--- a/scripts/kconfig/confdata.c
+++ b/scripts/kconfig/confdata.c
@@ -201,7 +201,7 @@ static int add_byte(int c, char **lineptr, size_t slen, size_t *n)
if (new_size > *n) {
new_size += LINE_GROWTH - 1;
new_size *= 2;
- nline = realloc(*lineptr, new_size);
+ nline = xrealloc(*lineptr, new_size);
if (!nline)
return -1;