aboutsummaryrefslogtreecommitdiffstats
path: root/darwin/PlatformHelpers.c
diff options
context:
space:
mode:
authorDaniel Lange <DLange@git.local>2024-01-10 12:40:37 +0100
committerDaniel Lange <DLange@git.local>2024-01-10 12:40:37 +0100
commit7271b076b82785ffca73ee9e4ae84cabb77018ee (patch)
treee8270dd60ec096bee8157dbadf029e15ed584592 /darwin/PlatformHelpers.c
parentf288666edc9180a2e81e6655951878124f321df6 (diff)
downloaddebian_htop-upstream.tar.gz
debian_htop-upstream.tar.bz2
debian_htop-upstream.zip
New upstream version 3.3.0upstream/3.3.0upstream
Diffstat (limited to 'darwin/PlatformHelpers.c')
-rw-r--r--darwin/PlatformHelpers.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/darwin/PlatformHelpers.c b/darwin/PlatformHelpers.c
index 97f0741..a4ea82b 100644
--- a/darwin/PlatformHelpers.c
+++ b/darwin/PlatformHelpers.c
@@ -103,9 +103,8 @@ double Platform_calculateNanosecondsPerMachTick(void) {
* the "Apple M1" chip specifically when running under Rosetta 2.
*/
- size_t cpuBrandStringSize = 1024;
- char cpuBrandString[cpuBrandStringSize];
- Platform_getCPUBrandString(cpuBrandString, cpuBrandStringSize);
+ char cpuBrandString[1024] = "";
+ Platform_getCPUBrandString(cpuBrandString, sizeof(cpuBrandString));
bool isRunningUnderRosetta2 = Platform_isRunningTranslated();

© 2014-2024 Faster IT GmbH | imprint | privacy policy