History

kbuild: fixdep: drop meaningless hash table initialization

The clear_config() is called just once at the beginning of this program, but the global variable hashtab[] is already zero-filled at the start-up.

Masahiro Yamada committed 11 years ago

Commit d179e221 parent d7211091 file · +0 −19Browse files

Showing the changes to scripts/basic (1 of 1 file). Show all

Unified · Split

scripts/basic/fixdep.c+0−19
@@ -191,23 +191,6 @@ static void define_config(const char *name, int len, unsigned int hash) · 190 unmodified lines
191191 hashtab[hash % HASHSZ] = aux;
192192 }
193193
194−/*
195− * Clear the set of configuration strings.
196− */
197−static void clear_config(void)
198−{
199− struct item *aux, *next;
200− unsigned int i;
201−
202− for (i = 0; i < HASHSZ; i++) {
203− for (aux = hashtab[i]; aux; aux = next) {
204− next = aux->next;
205− free(aux);
206− }
207− hashtab[i] = NULL;
208− }
209−}
210−
211194 /*
212195 * Record the use of a CONFIG_* word.
213196 */
@@ -325,8 +308,6 @@ static void parse_dep_file(void *map, size_t len) · 111 unmodified lines
325308 int saw_any_target = 0;
326309 int is_first_dep = 0;
327310
328− clear_config();
329−
330311 while (m < end) {
331312 /* Skip any "white space" */
332313 while (m < end && (*m == ' ' || *m == '\\' || *m == '\n'))