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 /Settings.c | |
parent | 53bcc5cbffbdd69e0e08bd33c5e357dd5b753456 (diff) |
Use unsigned types for CPU counts and associated variables
Diffstat (limited to 'Settings.c')
-rw-r--r-- | Settings.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -54,7 +54,7 @@ static void Settings_readMeterModes(Settings* this, const char* line, int column this->columns[column].modes = modes; } -static void Settings_defaultMeters(Settings* this, int initialCpuCount) { +static void Settings_defaultMeters(Settings* this, unsigned int initialCpuCount) { int sizes[] = { 3, 3 }; if (initialCpuCount > 4 && initialCpuCount <= 128) { sizes[1]++; @@ -125,7 +125,7 @@ static void readFields(ProcessField* fields, uint32_t* flags, const char* line) String_freeArray(ids); } -static bool Settings_read(Settings* this, const char* fileName, int initialCpuCount) { +static bool Settings_read(Settings* this, const char* fileName, unsigned int initialCpuCount) { FILE* fd = fopen(fileName, "r"); if (!fd) return false; @@ -344,7 +344,7 @@ int Settings_write(const Settings* this) { return r; } -Settings* Settings_new(int initialCpuCount) { +Settings* Settings_new(unsigned int initialCpuCount) { Settings* this = xCalloc(1, sizeof(Settings)); this->sortKey = PERCENT_CPU; |