summaryrefslogtreecommitdiffstats
path: root/kernel/scripts/basic/fixdep.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/scripts/basic/fixdep.c')
-rw-r--r--kernel/scripts/basic/fixdep.c26
1 files changed, 4 insertions, 22 deletions
diff --git a/kernel/scripts/basic/fixdep.c b/kernel/scripts/basic/fixdep.c
index b30406860..c68fd61fd 100644
--- a/kernel/scripts/basic/fixdep.c
+++ b/kernel/scripts/basic/fixdep.c
@@ -192,23 +192,6 @@ static void define_config(const char *name, int len, unsigned int hash)
}
/*
- * Clear the set of configuration strings.
- */
-static void clear_config(void)
-{
- struct item *aux, *next;
- unsigned int i;
-
- for (i = 0; i < HASHSZ; i++) {
- for (aux = hashtab[i]; aux; aux = next) {
- next = aux->next;
- free(aux);
- }
- hashtab[i] = NULL;
- }
-}
-
-/*
* Record the use of a CONFIG_* word.
*/
static void use_config(const char *m, int slen)
@@ -251,7 +234,8 @@ static void parse_config_file(const char *map, size_t len)
continue;
if (memcmp(p, "CONFIG_", 7))
continue;
- for (q = p + 7; q < map + len; q++) {
+ p += 7;
+ for (q = p; q < map + len; q++) {
if (!(isalnum(*q) || *q == '_'))
goto found;
}
@@ -260,9 +244,9 @@ static void parse_config_file(const char *map, size_t len)
found:
if (!memcmp(q - 7, "_MODULE", 7))
q -= 7;
- if( (q-p-7) < 0 )
+ if (q - p < 0)
continue;
- use_config(p+7, q-p-7);
+ use_config(p, q - p);
}
}
@@ -324,8 +308,6 @@ static void parse_dep_file(void *map, size_t len)
int saw_any_target = 0;
int is_first_dep = 0;
- clear_config();
-
while (m < end) {
/* Skip any "white space" */
while (m < end && (*m == ' ' || *m == '\\' || *m == '\n'))