2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-16 09:13:55 +08:00

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>
Signed-off-by: Michal Marek <mmarek@suse.com>
This commit is contained in:
Masahiro Yamada 2015-07-24 14:18:45 +09:00 committed by Michal Marek
parent 5b733faca6
commit d721109611

View File

@ -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);
}
}