summaryrefslogtreecommitdiffstats
path: root/LoadAverageMeter.c
diff options
context:
space:
mode:
authorChristian Göttsche <cgzones@googlemail.com>2020-11-24 18:31:03 +0100
committerBenny Baumann <BenBE@geshi.org>2020-12-06 16:03:44 +0100
commite1ce141bc3123c1dea7eb2ef908c8ebce945c72a (patch)
tree2da1f500777ba003c3ea1d73d97e259f0e099974 /LoadAverageMeter.c
parentd9224c66a41e7918570b81d41495870c20380c1d (diff)
Use size_t as len type for Meter_UpdateValues
Most of the time the parameter is passed to snprintf type functions
Diffstat (limited to 'LoadAverageMeter.c')
-rw-r--r--LoadAverageMeter.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/LoadAverageMeter.c b/LoadAverageMeter.c
index 76b89ea1..d5424cd2 100644
--- a/LoadAverageMeter.c
+++ b/LoadAverageMeter.c
@@ -24,7 +24,7 @@ static const int LoadMeter_attributes[] = {
LOAD
};
-static void LoadAverageMeter_updateValues(Meter* this, char* buffer, int size) {
+static void LoadAverageMeter_updateValues(Meter* this, char* buffer, size_t size) {
Platform_getLoadAverage(&this->values[0], &this->values[1], &this->values[2]);
xSnprintf(buffer, size, "%.2f/%.2f/%.2f", this->values[0], this->values[1], this->values[2]);
}
@@ -40,7 +40,7 @@ static void LoadAverageMeter_display(const Object* cast, RichString* out) {
RichString_append(out, CRT_colors[LOAD_AVERAGE_FIFTEEN], buffer);
}
-static void LoadMeter_updateValues(Meter* this, char* buffer, int size) {
+static void LoadMeter_updateValues(Meter* this, char* buffer, size_t size) {
double five, fifteen;
Platform_getLoadAverage(&this->values[0], &five, &fifteen);
if (this->values[0] > this->total) {

© 2014-2024 Faster IT GmbH | imprint | privacy policy