From: Masahiro Yamada Date: Thu, 11 Jan 2018 13:39:41 +0000 (+0900) Subject: kconfig: make conf_unsaved a local variable of conf_read() X-Git-Url: https://jxself.org/git/?p=carl9170fw.git;a=commitdiff_plain;h=04272dbc3dfed9d035a6359ff85101cddcd26bde kconfig: make conf_unsaved a local variable of conf_read() conf_unsaved is initialized by conf_read_simple(), but it is possible to move it to conf_read() so that it can be a local variable. Signed-off-by: Masahiro Yamada Signed-off-by: Christian Lamparter --- diff --git a/config/confdata.c b/config/confdata.c index 204e751..2e030b4 100644 --- a/config/confdata.c +++ b/config/confdata.c @@ -28,7 +28,7 @@ static void conf_message(const char *fmt, ...) __attribute__ ((format (printf, 1, 2))); static const char *conf_filename; -static int conf_lineno, conf_warnings, conf_unsaved; +static int conf_lineno, conf_warnings; const char conf_defname[] = "include/generated/defconfig"; @@ -290,7 +290,6 @@ load: conf_filename = name; conf_lineno = 0; conf_warnings = 0; - conf_unsaved = 0; def_flags = SYMBOL_DEF << def; for_all_symbols(i, sym) { @@ -409,6 +408,7 @@ setsym: int conf_read(const char *name) { struct symbol *sym; + int conf_unsaved = 0; int i; sym_set_change_count(0);