summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2015-08-12 07:31:41 +0900
committerTom Rini <trini@konsulko.com>2015-08-18 13:45:59 -0400
commit29974f773776e40a2cd5563bd7a83fd960651c3f (patch)
tree52e60bd332ff03c027ab56d0db2f1bbf302d7342 /scripts
parent04812605f37cbb9ee02317e5f2d845dcd4898550 (diff)
downloadu-boot-29974f773776e40a2cd5563bd7a83fd960651c3f.tar.gz
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: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/basic/fixdep.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/scripts/basic/fixdep.c b/scripts/basic/fixdep.c
index b30406860b..46cc1b3e5d 100644
--- a/scripts/basic/fixdep.c
+++ b/scripts/basic/fixdep.c
@@ -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);
}
}