diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2015-07-24 01:18:46 -0400 |
---|---|---|
committer | Michal Marek <mmarek@suse.com> | 2015-08-24 10:36:08 -0400 |
commit | d179e22762fd38414c4108acedd5feca4cf7e0d8 (patch) | |
tree | 75d083f8f2d3cadaef660f8faadd42d49182a310 /scripts | |
parent | d721109611fb94aff53c2397859046e5f92f55ae (diff) |
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.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Michal Marek <mmarek@suse.com>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/basic/fixdep.c | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/scripts/basic/fixdep.c b/scripts/basic/fixdep.c index 46cc1b3e5de2..c68fd61fdc42 100644 --- a/scripts/basic/fixdep.c +++ b/scripts/basic/fixdep.c | |||
@@ -192,23 +192,6 @@ static void define_config(const char *name, int len, unsigned int hash) | |||
192 | } | 192 | } |
193 | 193 | ||
194 | /* | 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 | |||
211 | /* | ||
212 | * Record the use of a CONFIG_* word. | 195 | * Record the use of a CONFIG_* word. |
213 | */ | 196 | */ |
214 | static void use_config(const char *m, int slen) | 197 | static void use_config(const char *m, int slen) |
@@ -325,8 +308,6 @@ static void parse_dep_file(void *map, size_t len) | |||
325 | int saw_any_target = 0; | 308 | int saw_any_target = 0; |
326 | int is_first_dep = 0; | 309 | int is_first_dep = 0; |
327 | 310 | ||
328 | clear_config(); | ||
329 | |||
330 | while (m < end) { | 311 | while (m < end) { |
331 | /* Skip any "white space" */ | 312 | /* Skip any "white space" */ |
332 | while (m < end && (*m == ' ' || *m == '\\' || *m == '\n')) | 313 | while (m < end && (*m == ' ' || *m == '\\' || *m == '\n')) |