Skip to content
Snippets Groups Projects
Commit 29974f77 authored by Masahiro Yamada's avatar Masahiro Yamada Committed by Tom Rini
Browse files

kbuild: fixdep: optimize code slightly


If the target string matches "CONFIG_", move the pointer p
forward.  This saves several 7-chars adjustments.

Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: default avatarTom Rini <trini@konsulko.com>
Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
parent 04812605
No related branches found
No related tags found
No related merge requests found
......@@ -251,7 +251,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 +261,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);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment