mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 12:43:29 +02:00
kconfig: remove dead code in conf_askvalue()
conf_askvalue() is only called for oldconfig, syncconfig, and oldaskconfig. If it is called for other cases, it is a bug. So, the code after the switch statement is unreachable. Remove the dead code, and clean up the switch statement. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
This commit is contained in:
@@ -84,8 +84,6 @@ static void xfgets(char *str, int size, FILE *in)
|
|||||||
|
|
||||||
static int conf_askvalue(struct symbol *sym, const char *def)
|
static int conf_askvalue(struct symbol *sym, const char *def)
|
||||||
{
|
{
|
||||||
enum symbol_type type = sym_get_type(sym);
|
|
||||||
|
|
||||||
if (!sym_has_value(sym))
|
if (!sym_has_value(sym))
|
||||||
printf("(NEW) ");
|
printf("(NEW) ");
|
||||||
|
|
||||||
@@ -107,24 +105,12 @@ static int conf_askvalue(struct symbol *sym, const char *def)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
/* fall through */
|
/* fall through */
|
||||||
case oldaskconfig:
|
default:
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
xfgets(line, sizeof(line), stdin);
|
xfgets(line, sizeof(line), stdin);
|
||||||
return 1;
|
|
||||||
default:
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (type) {
|
|
||||||
case S_INT:
|
|
||||||
case S_HEX:
|
|
||||||
case S_STRING:
|
|
||||||
printf("%s\n", def);
|
|
||||||
return 1;
|
|
||||||
default:
|
|
||||||
;
|
|
||||||
}
|
|
||||||
printf("%s", line);
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user