summaryrefslogtreecommitdiff
path: root/scripts/kconfig/nconf.gui.c
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2018-02-08 19:19:07 +0300
committerMasahiro Yamada <yamada.masahiro@socionext.com>2018-02-10 05:26:04 +0300
commitd717f24d8c68081caae2374cf5ea6c4e62c490fc (patch)
tree325008cf6d2fea2dfa15e4d49ae4d4d79fb1ff2b /scripts/kconfig/nconf.gui.c
parent9e3e10c725360b9d07018cfcd5b7b6b7d325fae5 (diff)
downloadlinux-d717f24d8c68081caae2374cf5ea6c4e62c490fc.tar.xz
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/nconf.gui.c')
-rw-r--r--scripts/kconfig/nconf.gui.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/kconfig/nconf.gui.c b/scripts/kconfig/nconf.gui.c
index a64b1c31253e..88874acfda36 100644
--- a/scripts/kconfig/nconf.gui.c
+++ b/scripts/kconfig/nconf.gui.c
@@ -6,6 +6,7 @@
*
*/
#include "nconf.h"
+#include "lkc.h"
/* a list of all the different widgets we use */
attributes_t attributes[ATTR_MAX+1] = {0};
@@ -374,7 +375,7 @@ int dialog_inputbox(WINDOW *main_window,
if (strlen(init)+1 > *result_len) {
*result_len = strlen(init)+1;
- *resultp = result = realloc(result, *result_len);
+ *resultp = result = xrealloc(result, *result_len);
}
/* find the widest line of msg: */