From: Masahiro Yamada Date: Fri, 24 Jul 2015 05:18:45 +0000 (+0900) Subject: kbuild: fixdep: optimize code slightly X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d721109611fb94aff53c2397859046e5f92f55ae;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git 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 Signed-off-by: Michal Marek --- diff --git a/scripts/basic/fixdep.c b/scripts/basic/fixdep.c index b30406860b73..46cc1b3e5de2 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); } }