Chore: fix a lot code smell

This commit is contained in:
李通洲
2025-03-25 20:03:09 +08:00
parent bf17f2b4b9
commit 7562e05123
23 changed files with 83 additions and 45 deletions
-2
View File
@@ -430,7 +430,6 @@ FF_MAYBE_UNUSED static uint16_t getPackageCount(FFstrbuf* cpuinfo)
while ((p = memmem(p, cpuinfo->length - (uint32_t) (p - cpuinfo->chars), "\nphysical id\t:", strlen("\nphysical id\t:"))))
{
if (!p) break;
p += strlen("\nphysical id\t:");
char* pend;
unsigned long id = strtoul(p, &pend, 10);
@@ -586,7 +585,6 @@ FF_MAYBE_UNUSED static uint16_t getLoongarchPropCount(FFstrbuf* cpuinfo, const c
while ((p = memmem(p, cpuinfo->length - (uint32_t) (p - cpuinfo->chars), key, keylen)))
{
if (!p) break;
p += keylen;
char* pend;
unsigned long id = strtoul(p, &pend, 10);