diff options
author | Christian Göttsche <cgzones@googlemail.com> | 2021-02-17 17:38:35 +0100 |
---|---|---|
committer | Benny Baumann <BenBE@geshi.org> | 2021-03-19 23:30:54 +0100 |
commit | a11d01568c5e7bc5570fd48fa0703d837c4bcd84 (patch) | |
tree | 3e298e81123789ed6ae288e5bd32e91ebfb3ff01 /solaris/SolarisProcessList.c | |
parent | 53bcc5cbffbdd69e0e08bd33c5e357dd5b753456 (diff) |
Use unsigned types for CPU counts and associated variables
Diffstat (limited to 'solaris/SolarisProcessList.c')
-rw-r--r-- | solaris/SolarisProcessList.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/solaris/SolarisProcessList.c b/solaris/SolarisProcessList.c index 1f24c9ab..5223addf 100644 --- a/solaris/SolarisProcessList.c +++ b/solaris/SolarisProcessList.c @@ -69,7 +69,7 @@ ProcessList* ProcessList_new(UsersTable* usersTable, Hashtable* pidMatchList, ui static inline void SolarisProcessList_scanCPUTime(ProcessList* pl) { const SolarisProcessList* spl = (SolarisProcessList*) pl; - int cpus = pl->cpuCount; + unsigned int cpus = pl->cpuCount; kstat_t* cpuinfo = NULL; kstat_named_t* idletime = NULL; kstat_named_t* intrtime = NULL; @@ -91,7 +91,7 @@ static inline void SolarisProcessList_scanCPUTime(ProcessList* pl) { } // Calculate per-CPU statistics first - for (int i = 0; i < cpus; i++) { + for (unsigned int i = 0; i < cpus; i++) { if (spl->kd != NULL) { if ((cpuinfo = kstat_lookup(spl->kd, "cpu", i, "sys")) != NULL) { if (kstat_read(spl->kd, cpuinfo, NULL) != -1) { |