Skip to content

Commit

Permalink
genksyms: make source_file a local variable in lexer
Browse files Browse the repository at this point in the history
This is only used in yylex() in lex.l

Signed-off-by: Masahiro Yamada <[email protected]>
  • Loading branch information
masahir0y committed Feb 16, 2021
1 parent aec6c60 commit ab37d5a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion scripts/genksyms/genksyms.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ static struct symbol *symtab[HASH_BUCKETS];
static FILE *debugfile;

int cur_line = 1;
char *cur_filename, *source_file;
char *cur_filename;
int in_source_file;

static int flag_debug, flag_dump_defs, flag_reference, flag_dump_types,
Expand Down
2 changes: 1 addition & 1 deletion scripts/genksyms/genksyms.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ typedef struct string_list **yystype;
#define YYSTYPE yystype

extern int cur_line;
extern char *cur_filename, *source_file;
extern char *cur_filename;
extern int in_source_file;

struct symbol *find_symbol(const char *name, enum symbol_type ns, int exact);
Expand Down
1 change: 1 addition & 0 deletions scripts/genksyms/lex.l
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ yylex(void)
static int suppress_type_lookup, dont_want_brace_phrase;
static struct string_list *next_node;
static char *source_file;
int token, count = 0;
struct string_list *cur_node;
Expand Down

0 comments on commit ab37d5a

Please sign in to comment.