diff options
Diffstat (limited to 'scripts/basic/fixdep.c')
| -rw-r--r-- | scripts/basic/fixdep.c | 26 |
1 files changed, 4 insertions, 22 deletions
diff --git a/scripts/basic/fixdep.c b/scripts/basic/fixdep.c index b30406860b73..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) |
| @@ -251,7 +234,8 @@ static void parse_config_file(const char *map, size_t len) | |||
| 251 | continue; | 234 | continue; |
| 252 | if (memcmp(p, "CONFIG_", 7)) | 235 | if (memcmp(p, "CONFIG_", 7)) |
| 253 | continue; | 236 | continue; |
| 254 | for (q = p + 7; q < map + len; q++) { | 237 | p += 7; |
| 238 | for (q = p; q < map + len; q++) { | ||
| 255 | if (!(isalnum(*q) || *q == '_')) | 239 | if (!(isalnum(*q) || *q == '_')) |
| 256 | goto found; | 240 | goto found; |
| 257 | } | 241 | } |
| @@ -260,9 +244,9 @@ static void parse_config_file(const char *map, size_t len) | |||
| 260 | found: | 244 | found: |
| 261 | if (!memcmp(q - 7, "_MODULE", 7)) | 245 | if (!memcmp(q - 7, "_MODULE", 7)) |
| 262 | q -= 7; | 246 | q -= 7; |
| 263 | if( (q-p-7) < 0 ) | 247 | if (q - p < 0) |
| 264 | continue; | 248 | continue; |
| 265 | use_config(p+7, q-p-7); | 249 | use_config(p, q - p); |
| 266 | } | 250 | } |
| 267 | } | 251 | } |
| 268 | 252 | ||
| @@ -324,8 +308,6 @@ static void parse_dep_file(void *map, size_t len) | |||
| 324 | int saw_any_target = 0; | 308 | int saw_any_target = 0; |
| 325 | int is_first_dep = 0; | 309 | int is_first_dep = 0; |
| 326 | 310 | ||
| 327 | clear_config(); | ||
| 328 | |||
| 329 | while (m < end) { | 311 | while (m < end) { |
| 330 | /* Skip any "white space" */ | 312 | /* Skip any "white space" */ |
| 331 | while (m < end && (*m == ' ' || *m == '\\' || *m == '\n')) | 313 | while (m < end && (*m == ' ' || *m == '\\' || *m == '\n')) |
