diff options
author | Nathan Scott <nathans@redhat.com> | 2023-09-01 09:34:46 +1000 |
---|---|---|
committer | Nathan Scott <nathans@redhat.com> | 2023-09-04 08:59:41 +1000 |
commit | 66c0b19ed6fec2afd4ed381665274fa83c67660e (patch) | |
tree | e8420e98aa4d5fb633cbb432babfa86d3dcdaf37 /freebsd/Platform.c | |
parent | 9392e1d596dd2bed165c8cb522a0c9fd5fede66d (diff) |
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).
Diffstat (limited to 'freebsd/Platform.c')
-rw-r--r-- | freebsd/Platform.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/freebsd/Platform.c b/freebsd/Platform.c index 66e1463d..9b8981ad 100644 --- a/freebsd/Platform.c +++ b/freebsd/Platform.c @@ -181,7 +181,7 @@ void Platform_getLoadAverage(double* one, double* five, double* fifteen) { *fifteen = (double) loadAverage.ldavg[2] / loadAverage.fscale; } -int Platform_getMaxPid(void) { +pid_t Platform_getMaxPid(void) { int maxPid; size_t size = sizeof(maxPid); int err = sysctlbyname("kern.pid_max", &maxPid, &size, NULL, 0); |