Commit b7875534 authored by A. Samy's avatar A. Samy

cpuid: use a hardcoded constant when comparing CPU names

Signed-off-by: default avatarA. Samy <f.fallen45@gmail.com>
parent eee52d39
......@@ -238,7 +238,7 @@ cputype_t cpuid_get_cpu_type(void)
get_cpuid(CPUID_VENDORID, &i, &u.bufu32[0], &u.bufu32[2], &u.bufu32[1]);
for (i = 0; i < sizeof(c_cpunames) / sizeof(c_cpunames); ++i) {
if (strncmp(c_cpunames[i], u.buf, sizeof(c_cpunames[0])) == 0) {
if (strncmp(c_cpunames[i], u.buf, 12) == 0) {
cputype = (cputype_t)i;
break;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment