Skip to content

Commit 0cc38c2

Browse files
committed
CPUUsage (FreeBSD): silence compiler warnings
1 parent d29931a commit 0cc38c2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/detection/cpuusage/cpuusage_bsd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const char* ffGetCpuUsageInfo(FFlist* cpuTimes)
1212
if(sysctlbyname("kern.cp_times", NULL, &neededLength, NULL, 0) != 0)
1313
return "sysctlbyname(kern.cp_times, NULL) failed";
1414

15-
uint32_t coreCount = neededLength / (CPUSTATES * (uint32_t) sizeof(uint64_t));
15+
uint32_t coreCount = (uint32_t) (neededLength / (CPUSTATES * sizeof(uint64_t)));
1616
assert(coreCount > 0);
1717

1818
FF_AUTO_FREE uint64_t (*cpTimes)[CPUSTATES] = malloc(neededLength);

0 commit comments

Comments
 (0)