DBG_OBJ(GATHER, cxt, ul_debug(" parse cpuinfo cache '%s'", data));
- p = strstr(data, "scope=") + 6;
+ p = strstr(data, "scope=");
/* Skip private caches, also present in sysfs */
- if (!p || strncmp(p, "Private", 7) == 0)
+ if (!p || strncmp(p + 6, "Private", 7) == 0)
return 0;
p = strstr(data, "level=");
if (!p || sscanf(p, "level=%d", &level) != 1)
return 0;
- p = strstr(data, "type=") + 5;
- if (!p || !*p)
+ p = strstr(data, "type=");
+ if (!p || !*(p + 5))
return 0;
+ p += 5;
type = 0;
if (strncmp(p, "Data", 4) == 0)
type = 'd';