From 66c0b19ed6fec2afd4ed381665274fa83c67660e Mon Sep 17 00:00:00 2001 From: Nathan Scott Date: Fri, 1 Sep 2023 09:34:46 +1000 Subject: Correct pid_t type return from Platform_getMaxPid function Coverity scanning shows we end up passing an integer into the Row_setPidColumnWidth routine which requires a pid_t - update each platform to return the correct type (and never return -1 as a failure code, this was being ignored). --- darwin/Platform.c | 2 +- darwin/Platform.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'darwin') diff --git a/darwin/Platform.c b/darwin/Platform.c index bb1ae92f..6a9c2184 100644 --- a/darwin/Platform.c +++ b/darwin/Platform.c @@ -227,7 +227,7 @@ void Platform_getLoadAverage(double* one, double* five, double* fifteen) { } } -int Platform_getMaxPid(void) { +pid_t Platform_getMaxPid(void) { /* http://opensource.apple.com/source/xnu/xnu-2782.1.97/bsd/sys/proc_internal.hh */ return 99999; } diff --git a/darwin/Platform.h b/darwin/Platform.h index cf00919f..f67db8ff 100644 --- a/darwin/Platform.h +++ b/darwin/Platform.h @@ -54,7 +54,7 @@ int Platform_getUptime(void); void Platform_getLoadAverage(double* one, double* five, double* fifteen); -int Platform_getMaxPid(void); +pid_t Platform_getMaxPid(void); double Platform_setCPUValues(Meter* mtr, unsigned int cpu); -- cgit v1.2.3