summaryrefslogtreecommitdiffstats
path: root/scripts/kconfig/confdata.c
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2018-02-16 13:38:31 -0500
committerMasahiro Yamada <yamada.masahiro@socionext.com>2018-03-01 10:26:47 -0500
commitcd81fc82b93fa408c30e08f59e5ef8caaa91d1d2 (patch)
tree5c6024076d70c2a392fb3207d6ba737ef7e5843b /scripts/kconfig/confdata.c
parent6c49f359ca14f973970324afc9b20208fa0bbad5 (diff)
kconfig: add xstrdup() helper
We already have xmalloc(), xcalloc(), and xrealloc((). Add xstrdup() 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 5c12dc91ef34..df26c7b0fe13 100644
--- a/scripts/kconfig/confdata.c
+++ b/scripts/kconfig/confdata.c
@@ -178,7 +178,7 @@ static int conf_set_sym_val(struct symbol *sym, int def, int def_flags, char *p)
178 case S_HEX: 178 case S_HEX:
179 done: 179 done:
180 if (sym_string_valid(sym, p)) { 180 if (sym_string_valid(sym, p)) {
181 sym->def[def].val = strdup(p); 181 sym->def[def].val = xstrdup(p);
182 sym->flags |= def_flags; 182 sym->flags |= def_flags;
183 } else { 183 } else {
184 if (def != S_DEF_AUTO) 184 if (def != S_DEF_AUTO)