Skip to content

Commit

Permalink
kconfig: make conf_unsaved a local variable of conf_read()
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
masahir0y committed Jan 21, 2018
1 parent 5a3dc71 commit 84dd95d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/kconfig/confdata.c
Original file line number Diff line number Diff line change
Expand Up @@ -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[] = "arch/$ARCH/defconfig";

Expand Down Expand Up @@ -290,7 +290,6 @@ int conf_read_simple(const char *name, int def)
conf_filename = name;
conf_lineno = 0;
conf_warnings = 0;
conf_unsaved = 0;

def_flags = SYMBOL_DEF << def;
for_all_symbols(i, sym) {
Expand Down Expand Up @@ -409,6 +408,7 @@ int conf_read_simple(const char *name, int def)
int conf_read(const char *name)
{
struct symbol *sym;
int conf_unsaved = 0;
int i;

sym_set_change_count(0);
Expand Down

0 comments on commit 84dd95d

Please sign in to comment.