mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/
synced 2026-04-28 21:46:43 -04:00
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>
This commit is contained in:
@@ -178,7 +178,7 @@ static int conf_set_sym_val(struct symbol *sym, int def, int def_flags, char *p)
|
||||
case S_HEX:
|
||||
done:
|
||||
if (sym_string_valid(sym, p)) {
|
||||
sym->def[def].val = strdup(p);
|
||||
sym->def[def].val = xstrdup(p);
|
||||
sym->flags |= def_flags;
|
||||
} else {
|
||||
if (def != S_DEF_AUTO)
|
||||
|
||||
Reference in New Issue
Block a user