mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-11-04 04:04:17 +01:00
Chore: introduce macro ARRAY_SIZE
This commit is contained in:
@@ -7,9 +7,9 @@
|
||||
const char* ffDetectMemory(FFMemoryResult* ram)
|
||||
{
|
||||
char buf[PROC_FILE_BUFFSIZ];
|
||||
ssize_t nRead = ffReadFileData("/proc/meminfo", sizeof(buf) - 1, buf);
|
||||
ssize_t nRead = ffReadFileData("/proc/meminfo", ARRAY_SIZE(buf) - 1, buf);
|
||||
if(nRead < 0)
|
||||
return "ffReadFileData(\"/proc/meminfo\", sizeof(buf)-1, buf)";
|
||||
return "ffReadFileData(\"/proc/meminfo\", ARRAY_SIZE(buf)-1, buf)";
|
||||
buf[nRead] = '\0';
|
||||
|
||||
uint64_t memTotal = 0,
|
||||
|
||||
Reference in New Issue
Block a user