Chore: introduce macro ARRAY_SIZE

This commit is contained in:
李通洲
2024-10-18 16:15:48 +08:00
parent 5497cb64c2
commit b257134d74
67 changed files with 142 additions and 135 deletions
+1 -1
View File
@@ -389,7 +389,7 @@ FF_MAYBE_UNUSED static void detectArmSoc(FFCPUResult* cpu)
// device-vendor,device-model\0soc-vendor,soc-model\0
char content[256];
ssize_t length = ffReadFileData("/proc/device-tree/compatible", sizeof(content), content);
ssize_t length = ffReadFileData("/proc/device-tree/compatible", ARRAY_SIZE(content), content);
if (length <= 2) return;
// get the second NUL terminated string if it exists